Closed Bug 1179569 Opened 5 years ago Closed 5 years ago

Remove use of monitor in MediaFormatReader::ResetDecode()

Categories

(Core :: Audio/Video, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox41 --- fixed
firefox42 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(1 file)

MediaFormatReader holds the decoder's monitor.

The MFR will call the demuxer's reset method which may cause it to seek back to 0.

While seeking, it may calls MediaResource::Read or MediaResource::ReadAt that may be blocking.
During this time the decoder's monitor is held.

MediaResource::Read/ReadAt may cause MediaDecoder::NotifyBytesDownloaded to be called which will attempt to grab the decoder's monitor leading to a dead lock.

Remove the use of the decoder's monitor appears safe as everything is done on the reader's task queue now.
Doesn't appear to ever have been required.
Attachment #8628575 - Flags: review?(bobbyholley)
Attachment #8628575 - Flags: review?(bobbyholley) → review+
Assignee: nobody → jyavenard
Blocks: 1148102
https://hg.mozilla.org/mozilla-central/rev/f1ad3428fdbf
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Comment on attachment 8628575 [details] [diff] [review]
Remove use of decoder's monitor in ResetDecode().

Approval Request Comment
[Feature/regressing bug #]:1156708
[User impact if declined]: Potential deadklock
[Describe test coverage new/current, TreeHerder]: in central for > 1 week
[Risks and why]: Very low.
[String/UUID change made/needed]: None
Attachment #8628575 - Flags: approval-mozilla-aurora?
Comment on attachment 8628575 [details] [diff] [review]
Remove use of decoder's monitor in ResetDecode().

Approving as it's a one-line patch and the patch has been in m-c for a week now so it seems stable.
Attachment #8628575 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.