Closed Bug 1323081 Opened 8 years ago Closed 8 years ago

Lots of WARNING: Invalid H.264 data

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(2 files)

Problem was introduced with bug 1321164 which enabled the PPS decoder. It finds that all H264 content is invalid somehow.
Sorry I don't understand this bug well, what's this bug for? Checking the h264 content is valid or not?
(In reply to Alastor Wu [:alwu] from comment #1) > Sorry I don't understand this bug well, what's this bug for? Checking the > h264 content is valid or not? Ffmpeg trimmed trailing 0 of pps mal first. We don't. So we attempt to read past the end of the data which triggers the warnings.
(In reply to Alastor Wu [:alwu] from comment #1) > Sorry I don't understand this bug well, what's this bug for? Checking the > h264 content is valid or not? Ffmpeg trimmed trailing 0 of pps mal first. We don't. So we attempt to read past the end of the data which triggers the warnings.
Assignee: nobody → jyavenard
Comment on attachment 8818465 [details] Bug 1323081: P1. Add native BitReader class. https://reviewboard.mozilla.org/r/98510/#review98780 r+, with behavior question: ::: media/libstagefright/binding/BitReader.cpp:42 (Diff revision 1) > - if (mBitReader->numBitsLeft() < aNum) { > + if (mTotalBitsLeft < aNum) { > + NS_ASSERTION(false, "Reading past end of buffer"); > return 0; > } So you want potential crashes in debug mode? (Just making sure that this new behavior is what you really intend.)
Attachment #8818465 - Flags: review?(gsquelart) → review+
Comment on attachment 8818465 [details] Bug 1323081: P1. Add native BitReader class. https://reviewboard.mozilla.org/r/98510/#review98780 > So you want potential crashes in debug mode? (Just making sure that this new behavior is what you really intend.) what crash? This is a soft assertion it will return 0, which means everything single read will fail after that and playback will fail. We will unecessarily attempt to read many times past the data potentially, but seing that it's broken, well it's broken :)
Comment on attachment 8818465 [details] Bug 1323081: P1. Add native BitReader class. https://reviewboard.mozilla.org/r/98510/#review98780 > what crash? > > This is a soft assertion > it will return 0, which means everything single read will fail after that and playback will fail. > > We will unecessarily attempt to read many times past the data potentially, but seing that it's broken, well it's broken :) Oh I see, thanks.
Comment on attachment 8818466 [details] Bug 1323081: [H264] P2. Ignore NAL stop bit and trailing 0. https://reviewboard.mozilla.org/r/98512/#review98786 r+ with micro-nit: ::: media/libstagefright/binding/H264.cpp:138 (Diff revision 1) > + uint8_t v = aNAL->ElementAt(size - 1); > + > + if (size > UINT32_MAX / 8) { > + // We can't represent it, we'll use as much as we can. > + return UINT32_MAX; > + } You don't need 'v' in the if-block, so I think you could swap the two.
Attachment #8818466 - Flags: review?(gsquelart) → review+
Comment on attachment 8818466 [details] Bug 1323081: [H264] P2. Ignore NAL stop bit and trailing 0. https://reviewboard.mozilla.org/r/98512/#review98786 > You don't need 'v' in the if-block, so I think you could swap the two. will do, and add a comment about what the code later does.
Pushed by jyavenard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4a0fa935cfc2 P1. Add native BitReader class. r=gerald https://hg.mozilla.org/integration/autoland/rev/79c7322f34ec [H264] P2. Ignore NAL stop bit and trailing 0. r=gerald
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Regressions: 1413750
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: