Remove an incorrect and unneeded assert in the amr demuxer.

Asserting a specific codec is not correct since libavformat
allows forcing a codec, an equivalent check is in the
following line.

Fixes ticket #3001.
avcodec/tiff_common: add ff_tadd_bytes_metadata()

The le argument is passed so the function has the same prototype as the
other similar functions. It is otherwise unused

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/exif: print bytes and undefined types as scalar lists

This prevents odd characters from ending in the fate test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Revert "fate: Force diff into text mode"

This should fix AIX and should no longer be needed

This reverts commit b78e75ebc9b03bea8f0c48da266ee6cc0fb8e22d.
avformat/mxfenc: instance number is just 24 bits

Fixes assertion failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegenc: fix muxrates AVOption maximum value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegenc: check, warn and clip VBV value to within syntactically possible values

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegenc: check, warn and clip muxrate to syntactical possible values

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vqf: Make sure sample_rate is set to a valid value

This avoids divisions by zero later (and possibly assertions in
time base scaling), since an invalid rate_flag combined with an
invalid bitrate below could pass the mode combination test.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
vqf: Make sure the bitrate is in the valid range

Even if the sample rate is valid, an invalid bitrate could
pass the mode combination test below.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
doc/demuxers: fix image2 examples

Signed-off-by: Paul B Mahol <onemda@gmail.com>
avidec: Make sure a packet is large enough before reading its data

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
xwma: Avoid division by zero

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
alac: Do bounds checking of lpc_order read from the bitstream

In lpc_prediction(), we write up to array element 'lpc_order' in
an array allocated to hold 'max_samples_per_frame' elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
mvi: Add sanity checking for the audio frame size

This avoids a division by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
riffdec: Add sanity checks for the sample rate

This avoids a division by zero for G726.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
electronicarts: Add more sanity checking for the number of channels

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
bfi: Avoid divisions by zero

If a zero-length video packet is to be returned, just return
AVERROR(EAGAIN) and switch back to the audio stream.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
bfi: Add some very basic sanity checks for input packet sizes

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
mov: Make sure the read sample count is nonnegative

This avoids setting a negative number of frames, ending up with a
negative average frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>