Closed Bug 1205911 Opened 9 years ago Closed 9 years ago

Skipping a video frame can cause a decoding error.

Categories

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

43 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox42 --- fixed
firefox43 --- fixed

People

(Reporter: jya, Assigned: jya)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

From time to time ; when watching YouTube with MSE webm enabled ; playback would stop and fall back to flash (if flash is installed) or display that an error occurred which will require to reload the page. This is intermittent and I can't reproduce the problem consistently (not today at least). But the VPX decoder returns an error and playback aborts.
Just reproduced it. Loaded https://www.youtube.com/watch?v=XqLTe8h0-jo let it play. I then refreshed the page one more time to reload the video 2071765760[118604660]: MediaSourceDecoder(14c523800)::GetBuffered: ranges=[(0.000000, 30.001000)] 1233928192[1488d7220]: MediaFormatReader(11b41a200)::NotifyError: Video Decoding error 1233928192[1488d7220]: MediaFormatReader(11b41a200)::ScheduleUpdate: SchedulingUpdate(Video) 1233928192[1488d7220]: MediaFormatReader(11b41a200)::Update: Processing update for Video Will enable more logs.
1532235776[152a48270]: VPXDecoder(152a47d40)::DoDecodeFrame: VPX Decode error: Corrupt frame detected 935460864[13aedb1d0]: MediaFormatReader(117567e00)::NotifyError: Video Decoding error So it is a VPXDecoder issue. Likely relevant ; I see in the log that frames where just dropped due to speed: 935460864[13aedb1d0]: MediaFormatReader(117567e00)::Flush: Flush(Video) END 935460864[13aedb1d0]: MediaFormatReader(117567e00)::SkipVideoDemuxToNextKeyFrame: Skipping up to 96561204 936296448[149209850]: MediaFormatReader(117567e00)::OnVideoDemuxCompleted: 1 video samples demuxed (sid:10) 936296448[149209850]: MediaFormatReader(117567e00)::ScheduleUpdate: SchedulingUpdate(Video) 936296448[149209850]: MediaFormatReader(117567e00)::NotifyNewOutput: Received new Video sample time:95880000 duration:40000 936296448[149209850]: MediaFormatReader(117567e00)::NotifyNewOutput: MediaFormatReader produced output while flushing, discarding. 936296448[149209850]: MediaFormatReader(117567e00)::NotifyInputExhausted: Decoder has requested more Video data 936296448[149209850]: MediaFormatReader(117567e00)::OnVideoSkipCompleted: Skipping succeeded, skipped 30 frames 936296448[149209850]: MediaFormatReader(117567e00)::Update: Processing update for Video 936296448[149209850]: MediaFormatReader(117567e00)::Update: Update(Video) ni=1 no=1 ie=1, in:0 out:0 qs=0 pending:0 ahead:0 sid:10 936296448[149209850]: MediaFormatReader(117567e00)::EnsureDecodersInitialized: Init decoders: audio: 14cd28b20, audio init: 1, video: 152a47d40, video init: 1 936296448[149209850]: MediaFormatReader(117567e00)::DecodeDemuxedSamples: Giving Video input to decoder 936296448[149209850]: MediaFormatReader(117567e00)::DecodeDemuxedSamples: Input:95960000 (dts:95960000 kf:0) 1532235776[152a48270]: VPXDecoder(152a47d40)::DoDecodeFrame: VPX Decode error: Corrupt frame detected It looks like the first frame provided after skipping to the next keyframe isn't a keyframe !
Should there be any demuxing request pending resolution, it would have caused our internal seek to ultimately fail.
Attachment #8662766 - Flags: review?(cpearce)
Attachment #8662765 - Flags: review?(cpearce) → review?(edwin)
Attachment #8662766 - Flags: review?(cpearce) → review?(edwin)
Blocks: 1197083
Summary: MSE / WebM decoding error → Skipping a video frame can cause a decoding error.
Assignee: nobody → jyavenard
Comment on attachment 8662765 [details] [diff] [review] P1. Cancel pending demux request when searching for next keyframe. Approval Request Comment [Feature/regressing bug #]: 1156708 [User impact if declined]: Decoding error ; corrupted frames ; fallback to Flash. this affects mostly MSE. [Describe test coverage new/current, TreeHerder]: local test [Risks and why]:Low, preventing corrupted data to be fed to the decoder [String/UUID change made/needed]: None
Attachment #8662765 - Flags: approval-mozilla-aurora?
request is for two patches
Comment on attachment 8662765 [details] [diff] [review] P1. Cancel pending demux request when searching for next keyframe. Fix a decoding issue: taking it.
Attachment #8662765 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8662766 - Flags: approval-mozilla-aurora+
(In reply to Sylvestre Ledru [:sylvestre] from comment #9) > Comment on attachment 8662765 [details] [diff] [review] > P1. Cancel pending demux request when searching for next keyframe. > > Fix a decoding issue: taking it. hey Sylvestre, jva, the approval + was done after the merge so this is now on aurora, does this now need beta approval ?
Flags: needinfo?(sledru)
Flags: needinfo?(jyavenard)
I hope not... my request was for 42 really (and earlier if it hadn't been too late)
Flags: needinfo?(jyavenard)
Comment on attachment 8662766 [details] [diff] [review] P2. Ensure demuxer is reset before performing a seek. [Triage Comment] Let's take it in beta. It should be in beta 2.
Flags: needinfo?(sledru)
Attachment #8662766 - Flags: approval-mozilla-aurora+ → approval-mozilla-beta+
Comment on attachment 8662765 [details] [diff] [review] P1. Cancel pending demux request when searching for next keyframe. [Triage Comment]
Attachment #8662765 - Flags: approval-mozilla-aurora+ → approval-mozilla-beta+
Flags: qe-verify+
Unable to reproduce this issue under Windows 7 64-bit nor Windows 10 32-bit, with Nightly from 2015-09-17 and 42.0b1. :jya, could you please confirm this fix on latest builds? Thanks in advance!
Flags: needinfo?(jyavenard)
The fix is on the 42 branch. It was easier to reproduce when enabling webm with MSE: You do so by setting media.mediasource.webm to true; and then seek within YouTube back and force THe bug was timing related, so there's no guarantees way to reproduce it consistently.
Flags: needinfo?(jyavenard)
I was unable to reproduce this issue on Firefox 43.0a1 (2015-09-17) under Windows 7 64-bit. However, I performed exploratory testing around this bug on Firefox 44.0a1, Firefox 43.0a2 and Firefox 42 Beta 9 and I've only encountered an intermittent video error: http://i.imgur.com/xo9XhS3.jpg This seems to be https://bugzilla.mozilla.org/show_bug.cgi?id=1034829 Since this bug could not be reproduced (also mentioned in Comment 16), I’m removing the qe-verify flag.
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: