2nd last painted frame is shown when stalling

NEW
Unassigned

Status

()

Core
Audio/Video: Playback
P3
normal
a year ago
10 months ago

People

(Reporter: jya, Unassigned)

Tracking

({regression, regressionwindow-wanted})

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

a year ago
This can be seen with this test case:
https://people-mozilla.org/~jyavenard/tests/mse_mp4/1342913/t2.html

This video is made of 47 frames (from 0 to 46).

When you play the video, you can see that frame 46 is displayed only for 45 to be displayed again.

So there order displayed is:

0, 1, ..., 45, 46, 45

when it should be:
0, 1, ..., 45, 46
(Reporter)

Comment 1

a year ago
interestingly, about media shows that it appears things have moved backward:

https://people-mozilla.org/~jyavenard/tests/mse_mp4/1342913/t2.html
	blob:https://people-mozilla.org/bcdf98fd-c0f3-1641-b4c9-752144b39ba9
	currentTime: 1.623958 readyState: 2
	Quality: 100% (total:90 dropped:0 corrupted:0)
	Buffered ranges: [(0.095, 1.625396)]
		SourceBuffer 0
			start=0.095 end=1.625396

currentTime isn't the end time.

I wonder if this is related to the issue mentioned by amazon where currentTime was prior the duration and ended wasn't fired.
(Reporter)

Updated

a year ago
Flags: needinfo?(jwwang)
I am able to repro the issue on Mac. Let's see some logs:

[MediaPlayback #3]: D/MediaSample Decoder=0x121590c00 OnAudioDecoded [1578956,1625395]
[MediaPlayback #2]: D/MediaSample Decoder=0x121590c00 OnVideoDecoded [1596677,1630000]
[MediaPlayback #3]: D/MediaSample Decoder=0x121590c00 OnVideoDecoded [1630000,1663333]
[MediaPlayback #2]: D/MediaSample Decoder=0x121590c00 OnVideoDecoded [1663333,1696666]

The end time of last audio sample is 1625395 which is smaller than 1630000 which is the start time of the 2nd last video frame. Therefore, MDSM enters buffering (and pauses playback) for running out of audio without displaying the last video frame.
Flags: needinfo?(jwwang)
(In reply to Jean-Yves Avenard [:jya] from comment #0)
> This can be seen with this test case:
> https://people-mozilla.org/~jyavenard/tests/mse_mp4/1342913/t2.html
> 
> This video is made of 47 frames (from 0 to 46).
> 
> When you play the video, you can see that frame 46 is displayed only for 45
> to be displayed again.
> 
> So there order displayed is:
> 
> 0, 1, ..., 45, 46, 45

Are you sure '46' is ever displayed for the video frames flip so quickly?
(Reporter)

Comment 4

a year ago
yes, I'm sure..

I made a 120fps video using my iphone and played it slowly (mode is called slow mo) , it's very easy to see then.
Priority: -- → P3
(Reporter)

Updated

10 months ago
See Also: → bug 1374548

Comment 5

10 months ago
I tested this issue using the test case from comment 0 with FF 51, 54, FF 55 beta and FF Nightly 56.0a1(2017-06-20) and I have the same result, the 45 is displayed at the end on all versions of FF that I used. 

Jean do you have any thoughts here? Thanks
Flags: needinfo?(jyavenard)
(Reporter)

Comment 6

10 months ago
see bug 1374548, explanation is given on why it happens.
Flags: needinfo?(jyavenard)
(Reporter)

Comment 7

10 months ago
are you certain you were using FF with the basic compositor? this issue was with this compositor, not the hardware accelerated ones (which are used by default on all platforms but linux)
You need to log in before you can comment on or make changes to this bug.