Closed Bug 1840933 Opened 2 years ago Closed 2 years ago

seeking to the end of video, then video would stuck on the last frame after starting next iteration of looping

Categories

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

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 2 obsolete files)

STR.

  1. go to https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  2. set loop=true
  3. seek to the end (need to seek to EOS directly)

Expected.
4. after seeking, video should start from the start position and display video frames correctly

Actual
4. after seeking, video starts from the start position, but the video frame stucks

The reason to set the offset is to make the data already in the queue
being consitent with the data which will be added to the queue. If the
queue is empty, then we don't need to do that.

If we put the last frame into the video queue, then when starting next
iternation of looping, video rendering would stuck because that video
frame's timestamp is way larger than the clock time. Video sink would
keep rendering the same frame again and again until the clock time
catches up with the video timestamp. All newly decoded video frames
would not be rendered correctly.

The reason of this issue not showing in non-seamless looping is because
non-seamless looping would always perform seeking to the start position,
which clear the media queue before starting.

Depends on D182415

The original change was introduced when implementing seamless audio
looping, and it's no longer needed. Because now we would properly
adjust the offset of the media queue when entering the looping decoding
state to make the media time and the clock time consistent.

Depends on D182417

Test video is created by ffmpeg by using
ffmpeg -f lavfi -i color=c=white:s=640x480:r=30:d=3 -f lavfi -i color=c=black:s=640x480:r=30:d=1 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0" -c:v libvpx-vp9 output.webm

Depends on D182526

Attachment #9341637 - Attachment is obsolete: true
Attachment #9341638 - Attachment is obsolete: true
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6097d61f8998 part1 : no need to set playback position to zero anymore. r=padenot https://hg.mozilla.org/integration/autoland/rev/65f956864b79 part2 : add a test. r=padenot
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: