These tests are exploratory, they don't particularly match whatever the
original issues were discovered, so it is safe to disable them for now.
A future bug will look at re-enabling them, but without all the output
that they generate.
--HG--
extra : rebase_source : c31b049d696d09094a8fb94f09525756840cf33f
- Made externally-sized 'new' allocations fallible.
- Check return value of every new(fallible)/malloc/realloc.
- Consistently return -ENOMEM when allocations fail.
- MPEG4Extractor::getTrack() and getMetaData() can return null (because of
failed parse or failed alloc); added missing checks in callers.
Note: Some allocs in the 2nd half of MPEG4Extractor have not been touched, as
they are in unused code to be removed in bug 1210319.
Found only one other use that needed better checks: the size of the pssh
data was only checked after all items were added up; so it would be
possible to create a set of big items such that they create an overflow,
but the final sum looks reasonable.
Instead each item size should be checked, and the sum should also be
checked at each step.
This makes PlanarYCbCrImage abstract and moves the recycling functionality
into RecyclingPlanarYCbCrImage. This decreases the size of
SharedPlanarYCbCrImage and makes it possible for us to do part 3 of bug
1216644.
The timescale is read as an unsigned integer, but was stored signed in MPEG4Source,
causing it to overflow into a negative number if too big, causing later issues when
exporting indices with negative timestamps.
Use the new LazyLogModule to instantiate a log for the rust
mp4parse test code instead of using indiscriminate printf()s.
Access results with NSPR_LOG_MODULES=MP4Metadata:5.
Add a helper for passing the initialization segments
of mp4 streams to the rust parser and log the result.
This runs real data through the new parser for testing
but doesn't use the results.
Code is conditional on MOZ_RUST_MP4PARSE to be defined
in confvars.sh. See bug 1219530.
Coercing the shift to a bool makes the comparison useless.
This just affects whether a warning is printed, so there's
no change to what files we accept.
We also need to mask of the high 'Starts with SAP' bit
which is usually set and would replace our false negative
with a false positive. ISO/IEC 14496-12:2012(E) sec. 8.16.3.2
Results of running the new update-rust script.
- Include some #[inline] directives missed in bug 1215234.
- Remove #[crate-name] directive to silence a warning caused
by our building byteorder as a submodule instead of a crate.
Automate update and patching of the rust mp4 parser from the
upstream repo. A rev for mp4parse-rust can be passed on the
command line, but the byteorder crate's version is hardcoded.
Differences to adapt to the gecko build system are applied as
patches like we do for other media code.
Unfortunately cargo isn't much help here. It can download
crates for us, and we can set CARGO_HOME to force it to
use a specific directory, but it doesn't return enough
information to get the versions, etc. without some guessing/scraping
to find the packaged source.