Skipping a video frame can cause a decoding error.

RESOLVED FIXED in Firefox 42

Status

()

Core
Audio/Video: Playback
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jya, Assigned: jya)

Tracking

(Blocks: 1 bug)

43 Branch
mozilla43
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed, firefox43 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
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.
(Assignee)

Comment 2

2 years ago
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 !
(Assignee)

Comment 3

2 years ago
Created attachment 8662765 [details] [diff] [review]
P1. Cancel pending demux request when searching for next keyframe.
Attachment #8662765 - Flags: review?(cpearce)
(Assignee)

Comment 4

2 years ago
Created attachment 8662766 [details] [diff] [review]
P2. Ensure demuxer is reset before performing a seek.

Should there be any demuxing request pending resolution, it would have caused our internal seek to ultimately fail.
Attachment #8662766 - Flags: review?(cpearce)
(Assignee)

Updated

2 years ago
Attachment #8662765 - Flags: review?(cpearce) → review?(edwin)
(Assignee)

Updated

2 years ago
Attachment #8662766 - Flags: review?(cpearce) → review?(edwin)
(Assignee)

Updated

2 years ago
Blocks: 1197083
(Assignee)

Updated

2 years ago
Summary: MSE / WebM decoding error → Skipping a video frame can cause a decoding error.
Attachment #8662766 - Flags: review?(edwin) → review+
Attachment #8662765 - Flags: review?(edwin) → review+

Comment 5

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc97158a13f1
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd3d3205f92c
(Assignee)

Updated

2 years ago
Assignee: nobody → jyavenard
(Assignee)

Updated

2 years ago
status-firefox42: --- → affected
(Assignee)

Comment 6

2 years ago
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?
(Assignee)

Comment 7

2 years ago
request is for two patches
https://hg.mozilla.org/mozilla-central/rev/dc97158a13f1
https://hg.mozilla.org/mozilla-central/rev/fd3d3205f92c
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox43: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
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)
(Assignee)

Comment 11

2 years ago
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+
https://hg.mozilla.org/releases/mozilla-beta/rev/555c96f213e1
https://hg.mozilla.org/releases/mozilla-beta/rev/fd3ec6215a47
status-firefox42: affected → fixed
Flags: qe-verify+
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1203130

Comment 16

2 years ago
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)
(Assignee)

Comment 17

2 years ago
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.