Closed
Bug 1323081
Opened 8 years ago
Closed 8 years ago
Lots of WARNING: Invalid H.264 data
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
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.
Comment 1•8 years ago
|
||
Sorry I don't understand this bug well, what's this bug for? Checking the h264 content is valid or not?
Assignee | ||
Comment 2•8 years ago
|
||
(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 | ||
Comment 3•8 years ago
|
||
(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.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee: nobody → jyavenard
Comment 6•8 years ago
|
||
mozreview-review |
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+
Assignee | ||
Comment 7•8 years ago
|
||
mozreview-review-reply |
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 8•8 years ago
|
||
mozreview-review-reply |
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 9•8 years ago
|
||
mozreview-review |
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+
Assignee | ||
Comment 10•8 years ago
|
||
mozreview-review-reply |
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.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 18•8 years ago
|
||
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
Comment 19•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4a0fa935cfc2
https://hg.mozilla.org/mozilla-central/rev/79c7322f34ec
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•