Closed
Bug 1189197
Opened 10 years ago
Closed 10 years ago
Race in bufferqueue_callback (cubeb_opensl.c)
Categories
(Core :: Audio/Video: MediaStreamGraph, defect)
Core
Audio/Video: MediaStreamGraph
Tracking
()
RESOLVED
FIXED
mozilla42
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(1 file)
|
1.76 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
This bug is explored by bug 1187817 (see bug 1187817 comment 18).
When opensl_stream_start is called, it is possible bufferqueue_callback is still in progress. Since opensl_stream_start calls bufferqueue_callback, bufferqueue_callback (which is not reentrant) will be entered from 2 threads and cause errors.
See bug 1187817 comment 19 ~ bug 1187817 comment 24 for more details.
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Comment 2•10 years ago
|
||
The only problem left is, do we need to enqueue a silent frame each time resuming playback? I think not.
https://hg.mozilla.org/mozilla-central/file/2ddec2dedced/media/libcubeb/src/cubeb_opensl.c#l111
bufferqueue_callback ensure there is always at least one buffer in the queue. So whenever playback is resumed, there will always be a buffer to be consumed to kick off the buffer queue callback.
| Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Comment on attachment 8641462 [details] [diff] [review]
1189197_fix_bufferqueue_callback_reentrant-v1.patch
Review of attachment 8641462 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks, let's give this a shot!
Attachment #8641462 -
Flags: review?(kinetik) → review+
| Assignee | ||
Comment 5•10 years ago
|
||
Thanks for the review!
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•