Closed Bug 1187076 Opened 11 years ago Closed 11 years ago

Assertion failure: mBitReader.numBitsLeft() [@mp4_demuxer::BitReader::ReadBits]

Categories

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

x86_64
Linux
defect

Tracking

()

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

People

(Reporter: tsmith, Assigned: rillian)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file log.txt —
Assertion failure: mBitReader.numBitsLeft(), at /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/media/libstagefright/binding/H264.cpp:29
Attached video test_case.mp4 —
Assignee: nobody → jyavenard
Priority: -- → P2
Need to make this a non-fatal assert.
Assignee: jyavenard → giles
that line can be removed as we test for the size just after.
I don't think that's right. If we skip the assert, ReadBit() will return zero, the zero-count loop in ReadUE() can exhaust and we'd still MOZ_ASSERT(false) on line 74. We either need some kind of error flag DecodeSPS can check at the end and report failure, or relax these to NS_WARNING so we still get debug information without failing the test. Depends how bad having zeroes in the SPS table is, I guess.
Probably the best solution would be to change ByteReader to print warnings and set an error flag. We can check the error flag outside of ByteReader before the destructor gets called. It is an error if nobody has checked the error flag before calling the destructor and we could assert in that case.
Here's a minimal patch to convert the assert to a warning. Jean-Yves, is this what you had in mind? Note I can't reproduce with the testcase, so this is based on looking at the code and the stack trace.
Attachment #8658521 - Flags: review?(jyavenard)
Comment on attachment 8658521 [details] [diff] [review] Convert assert to warning Review of attachment 8658521 [details] [diff] [review]: ----------------------------------------------------------------- yes.. ideally we should be able to handle error in SPS, the entire code assume it's always valid.
Attachment #8658521 - Flags: review?(jyavenard) → review+
Blocks: 1203205
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: