Closed Bug 1189173 Opened 6 years ago Closed 6 years ago

drop frames aggressively in internal seek

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: ayang, Assigned: ayang)

Details

Attachments

(1 file, 1 obsolete file)

It is found while fixing bug 1146086.

In MediaFormatReader::Update() with 2 or more frames in decoder.mOutput, it could cause !NeedInput(decoder) is true. Then playback stops. [1]

For exmaple:

If decoder.mTimeThreshold = 500 with following frames

decoder.mOutput[0] with mTime = 100
decoder.mOutput[1] with mTime = 150

Only decoder.mOutput[0] will be discarded and decoder.mOutput.IsEmpty() will be false. !NeedInput(decoder) is true, which stopping demuxing to grab data.

[1] https://dxr.mozilla.org/mozilla-central/source/dom/media/MediaFormatReader.cpp#1031
Attached patch discard_frame_more_aggressive (obsolete) — Splinter Review
Assignee: nobody → ayang
Attachment #8640916 - Flags: review?(jyavenard)
Comment on attachment 8640916 [details] [diff] [review]
discard_frame_more_aggressive

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

good catch !

::: dom/media/MediaFormatReader.cpp
@@ +1056,1 @@
>        }

It makes the code a bit hard to read ; but I can't see an easier/better way at a glance.
Attachment #8640916 - Flags: review?(jyavenard) → review+
Keywords: checkin-needed
Summary: dropping frame aggressively in internal seek → drop frames aggressively in internal seek
Comment on attachment 8640916 [details] [diff] [review]
discard_frame_more_aggressive

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

Can you correct with:
Drop frames aggressively during internal seek.

Thanks.
Attachment #8640916 - Attachment is obsolete: true
Attachment #8640953 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4d0818791d07
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.