The default bug view has changed. See this FAQ.

ASSERTION: Decoded samples for Vorbis packet don't match expected

RESOLVED FIXED in mozilla8

Status

()

Core
Audio/Video
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: cpearce, Assigned: cajbir)

Tracking

Trunk
mozilla8
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound], URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
The code to predict the number of samples in an Ogg Vorbis packet is firing an assertion while decoding many of the Ogg files in the Pirates Love Daisies HTML5 demo. e.g.:

http://www.pirateslovedaisies.com/audio/units/U-Thug8.ogg

7672[bae9d60]: ###!!! ASSERTION: Decoded samples for Vorbis packet don't match expected!: 'mVorbisPacketSamples[aPacket] == aSamples', file c:/Users/cpearce/src/blue/objdir/conten
/media/ogg/../../../../content/media/ogg/nsOggCodecState.cpp, line 126
###!!! ASSERTION: Decoded samples for Vorbis packet don't match expected!: 'mVorbisPacketSamples[aPacket] == aSamples', file c:/Users/cpearce/src/blue/objdir/content/media/ogg/../
./../../content/media/ogg/nsOggCodecState.cpp, line 126
(Assignee)

Comment 1

6 years ago
Created attachment 550000 [details]
Test file

I've attached a test file that also causes the assertion. The file is from the test in bug 668449 comment 6.
(Assignee)

Updated

6 years ago
Assignee: nobody → chris.double
(Assignee)

Comment 2

6 years ago
Created attachment 550010 [details] [diff] [review]
Fix

Account for trailing data in the last frame of vorbis file when doing debug sanity checks.
Attachment #550010 - Flags: review?(chris)
Comment on attachment 550010 [details] [diff] [review]
Fix

>+    // Account for a partial last frame
>+    if (packet->e_o_s && packet->granulepos > mGranulepos) {
>+       samples = packet->granulepos - mGranulepos;
>+    }

Is there a particular reason you're using > instead of >=? I don't see an explicit limit in the spec on how many samples can be trimmed by a short granpos on the last page, but I know that at the start of the stream, removing _all_ the samples from the packet (to give a granpos of 0) is explicitly allowed.
(Assignee)

Comment 4

6 years ago
Created attachment 550048 [details] [diff] [review]
Fix

Thanks Tim, I wasn't aware of that. Changed to >= as per your suggestion in comment 3.
Attachment #550010 - Attachment is obsolete: true
Attachment #550048 - Flags: review?(chris)
Attachment #550010 - Flags: review?(chris)
(Reporter)

Updated

6 years ago
Attachment #550048 - Flags: review?(chris) → review+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/e8fe55848089
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/e8fe55848089
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.