1. validate the moov size before checking for cmov atom
2. avoid performing arithmetic operations on unvalidated numbers
3. verify the stco/co64 offset count does not overflow the stco/co64
atom (not only the moov atom)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
The last workaround is not sufficient to make oss fuzz work with the iterate API
as it did not provide a FFmpeg that external libs can be linked to.
This patch does not fully restore the pre iterate functionality. My attempts to
do this have so far failed.
The problem with this solution is that it renders the fuzzers virtual system
ffmpeg (libs) non functional. Which differs from a real system compared to the
virtual system tested by the fuzzer.
It should theoretically not matter as the system ffmpeg wouldnt be used.
But with more cases being fuzzed we likely will hit a case where a external
lib is involved and it does matter ...
Working around this may be possible with weak symbols but so far my attempts
failed
Alternatively multiple ffmpeg could be built, this becomes messy though
quickly as they need to be all linked together. That is we need a FFmpeg
that has the iterate API modified so it can work with the resources
available to ossfuzz. And at the same time we need a ffmpeg that has
its full functionality for any external libs which use ffmpeg and are
used by ffmpeg.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
A few days ago ossfuzz stoped testing new FFmpeg as it run out of diskspacee
https://oss-fuzz-build-logs.storage.googleapis.com/index.html
An alternative would be to revert the API.
This changes for example
-rwxr-x--- 1 michael michael 144803654 May 14 12:54 tools/target_dec_ac3_fixed_fuzzer*
to
-rwxr-x--- 1 michael michael 30333852 May 14 12:51 tools/target_dec_ac3_fixed_fuzzer*
Which should massively decrease space requirements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).
Signed-off-by: Josh de Kock <josh@itanimul.li>
The toolchain for this target is unmaintained since many years.
While it has been continuously build tested on fate, it hasn't
actually been tested at runtime since many, many years (and back
then, only a few codecs in libavcodec were tested).
So far, keeping support for it has been mostly effortless, but
the compiler does seem to have issues with dllimported data symbols,
ending up as internal compiler errors in some cases. Instead of
jumping through further hoops to work around that, just remove the
target.
Signed-off-by: Martin Storsjö <martin@martin.st>
This allows fuzzing decoders with the same codec_id
We also avoid register all to allow the linker to prune unused sections and symbols
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
The header is not always available in the docker build environment
Suggested-by: Kostya Serebryany
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit '3e105d08848162b90d886bde59c010d4b0362a4b':
build: Move entries related to building TOOLS to a subdirectory Makefile
Merged-by: James Almer <jamrial@gmail.com>
* commit '233d50b275dd7cf6cc0656851e670e1b2dfba56f':
qt-faststart: Do not try to use fancy 64-bit seeking functions on mingw32ce
Merged-by: James Almer <jamrial@gmail.com>
Name and purpose are more appropriate there since the code isn't
an ideal example.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
It serves absolutely no purpose other than to confuse potentional
Android developers about how to use hardware acceleration properly
on the the platform. The stagefright "API" is not public, and the
MediaCodec API is the proper way to do this.
Furthermore, stagefright support in avcodec needs a series of
magic incantations and version-specific stuff, such that
using it actually provides downsides compared just using the actual
Android frameworks properly, in that it is a lot more work and confusion
to get it even running. It also leads to a lot of misinformation, like
these sorts of comments (in [1]) that are absolutely incorrect.
[1] http://stackoverflow.com/a/29362353/3115956
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '30a041887f89cd97c372ad6a516da6e012f2c88b':
ismindex: Calculate the pts duration of trun atoms, not the dts duration
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Since the duration is compared to the tfra durations/intervals which
are expressed in pts, calculate that here as well.
Signed-off-by: Martin Storsjö <martin@martin.st>
The comments/header of the file are taken from qemu, they provide some
basic documentation
The code from the examples
Ive no means to test this except uploading to coverity for FFmpeg, so each
commit should stay simple, making it easy to revert.
Also please help making this a useful and effective file by contributing
changes/code to it and reviewing contributions.
I am happy to upload changes but i cannot really maintain this (alone) as
i cannot test changes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '470c9db11ff2c3249e995e7ba68e87bb81bf778c':
sidxindex: Remove parsing that isn't necessary any longer
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5cf6bda6e2eae496e8eb2bb06c96852d59a58b8a':
sidxindex: Don't adjust the Period start time depending on the track start time
Merged-by: Michael Niedermayer <michaelni@gmx.at>
When we don't adjust the Period start time, we don't need to
parse the earliest_presentation_time from the sidx boxes either.
Signed-off-by: Martin Storsjö <martin@martin.st>
This was only necessary to get playback to start with dash.js 1.2.0,
it has been fixed in the git version.
The previous behaviour was incorrect - the Period's start time
is irrespective of the actual first timestamp of the contents
within the period. The Period start time only says when, within the
global timeline, this particular piece should start to be played
back.
Signed-off-by: Martin Storsjö <martin@martin.st>
Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '979932378ae3fbf452e312eb759cc7ce175f78de':
ismindex: use tfhd default duration if no sample duration
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Reads the fragment duration from the trun sample data, rather than
assuming that there are no gaps. Creates much better playlists for our
inputs.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '00431bf874e1044b01e09a2266ef85d4ff8d44cc':
ismindex: handle time discontinuities and nonzero start time
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The input file may not have consistent start times, stream durations and
chunk durations. This patch at least removes negative durations that
make chromecast unhappy, and correctly sets starting time on chunks so
that the split (or .ismf) outputs match the manifest.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit 'fcf597625c7a991ca389f3a9b8ff4f5e383301c0':
ismindex: Avoid writing ismf files if no base name has been specified
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Previously, this could create files named "(null).ismf", if the -ismf
parameter is specified (before an input file name), but without
specifying any base name.
Signed-off-by: Martin Storsjö <martin@martin.st>
This is a non-standard file that maps the MSS segment names to offsets
in the ISMV file. This can be used to build a custom MSS streaming
server without splitting the ISMV into separate files.
Signed-off-by: Martin Storsjö <martin@martin.st>
This creates best-effort results from input that is missing stream
contents, there are warnings printed when this happens.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '3526ab891c28396ada8b58bf7647309bab30de1d':
qt-faststart: Undefine fseeko/ftello before defining them
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f920d089535bf7cf10aeda900cc43201c5e18cd0':
ismindex: Add an option for outputting files elsewhere than in the current directory
Conflicts:
tools/ismindex.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '6bc4934b75dde9354ee16a6e700ebe6775abf69e':
ismindex: Allow adding a path prefix to the generated .ism file
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This allows storing the .ismv/.isma/.ismc files separately from
the .ism file on a server, without having to manually edit the
.ism file after generating it with the ismindex tool.
Signed-off-by: Martin Storsjö <martin@martin.st>
Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'bb95334c34d0d9abccea370ae25c4765d7764ab8':
qt-faststart: Check offset_count before reading from the moov_atom buffer
Conflicts:
tools/qt-faststart.c
See: 0ea4742341
Merged-by: Michael Niedermayer <michaelni@gmx.at>