Closed Bug 1058428 Opened 5 years ago Closed 5 years ago

MediaSourceReader::DecodersContainTime is busted

Categories

(Core :: Audio/Video, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: kinetik, Assigned: jya)

References

Details

Attachments

(1 file)

MediaSourceReader::Seek waits for the subdecoders to have data in the range it wants to seek into.  This is tested via DecodersContainTime, but that will return true even if only one of the subdecoders contain the target range.  If we have separate audio and video subdecoders and only one is ready, the WaitForData loop in Seek will exit early and seeking will fail.
Assignee: nobody → cajbir.bugzilla
Assignee: cajbir.bugzilla → jyavenard
Bug 1058428 - Ensure all decoders contain target range
Attachment #8479532 - Flags: review?(cajbir.bugzilla)
Attachment #8479532 - Flags: review?(cajbir.bugzilla) → review+
Keywords: checkin-needed
Comment on attachment 8479532 [details] [diff] [review]
Ensure all in-use decoders contain the target range

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

::: content/media/mediasource/MediaSourceReader.cpp
@@ +403,2 @@
>    for (uint32_t i = 0; i < mDecoders.Length(); ++i) {
> +    if (!mDecoders[i]->IsDiscarded()) {

This is not correct, because these decoders may still be contributing frames to the "track buffer".  IsDiscarded tells us that we can't expect more data to be added to this decoder via SB::AppendBuffer, but we can still use the data that this decoder already has (and we are reporting is present via SB::GetBuffered).
Blocks: 1059058
(In reply to Matthew Gregan [:kinetik] from comment #2)
> This is not correct, because these decoders may still be contributing frames
> to the "track buffer".  IsDiscarded tells us that we can't expect more data
> to be added to this decoder via SB::AppendBuffer, but we can still use the
> data that this decoder already has (and we are reporting is present via
> SB::GetBuffered).

Filed bug 1059058 to handle this.
https://hg.mozilla.org/mozilla-central/rev/36da0216faed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.