I think this turned out pretty terrible. There's no good way to add new
custom tags that write to AVFormatContext->metadata.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The previous code assumed if an atom was marked with a 64-bit
size extension, it actually had that data available. The new
code verfies there's enough data in the atom for this to be
done.
Failure to verify causes total_size > atom.size which will
result in negative size calculations later on.
Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Under abnormal conditions the item_count may exceed the max
allocation size on 32-bit systems, this causes the allocated
size to overflow and become too small for the given count.
Additionally, if av_reallocp() fails its allocation, the
fragment_index_count is not correctly decremented.
Ensuring further havoc may be wrought, the error code for
read_tfra() is not checked upon return.
Found-by: Paul Mehta <paul@paulmehta.com>
positive return code and use of _array functions by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This should allow us to insert idet before scale and let scale have interl=-1 as default in that case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ID3v1 fields have a fixed size, and they are padded either with zeros,
or with spaces. Handle the latter case, instead of putting strings with
trailing spaces into the AVDictionary.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86inc can translate r*m into a register or stack on its own
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
The code blindly trusted buffer offsets read from the file in the RLE
decoder. Explicitly check the offset. Also error out on other RLE
decoding errors.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg looks for both .ffpreset and .avpreset files depending on whether the
-[avsf]pre or -pre option is used. Added two sections for each type of preset
including the rules according to which files are searched.
(Notably, the lookup order is swapped for avpreset files, because it first
looks for <codec>_<arg>.avpreset and then for <arg>.avpreset.)
This removes the section explaining -pre only, which was under "Examples",
where it did not really make sense.
Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '46808fdf04ab113df374157b90b506eb3110daf2':
movenc: Enable editlists by default if delay_moov is enabled
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This comment can be traced back to the initial commit from 2001,
and it seemed to be misleading/incorect already back then. (It
was used for normal, non-raw file formats already then.)
Signed-off-by: Martin Storsjö <martin@martin.st>
This allows using libraries that are detected via pkg-config with
msvc. (The libraries themselves may have to be built with MSVC
though.)
Signed-off-by: Martin Storsjö <martin@martin.st>