Closed Bug 1188233 Opened 7 years ago Closed 7 years ago

If decoder can't be recreated, MediaFormatReader will not notify parent decoder

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: jya, Assigned: jya)

Details

Attachments

(1 file)

When a decoder can't be recreated for whatever reason an error is dispatched.  MediaFormatReader when encountering an error attempts to drain the current decoder ; which doesn't exist.

MediaFormatReader then waits on DrainComplete to be called. Call that will never occur
Assignee: nobody → jyavenard
Comment on attachment 8639675 [details] [diff] [review]
Ensure drainComplete flag is set upon failure to create decoder.

Review of attachment 8639675 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/MediaFormatReader.cpp
@@ +987,1 @@
>    decoder.mOutputRequested = true;

Maybe the "decoder.mOutputRequested = true;" line should be down right before the "decoder.mDecoder->Drain();" call, so we don't set it if we bail out here in the NotifyDrainComplete() path?
Attachment #8639675 - Flags: review?(cpearce) → review+
yes, it's probably more elegant that way.
Having said that, both case reports a problem with the current decoder, and no output will be coming our way anyway.
I backed it out, appears to cause timeout on all eme test.

will check that out
Well, turned out that you do want to set mOutputRequested to true, otherwise NotifyDrainComplete() still thinks we're within the flush()
https://hg.mozilla.org/mozilla-central/rev/0582b7cd2052
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.