vorbis_parser: Include stdint.h in the header, to make it work standalone

This fixes "make checkheaders".

Signed-off-by: Martin Storsjö <martin@martin.st>
avformat/os_support: try to fix build when included from a c++ file like libavdevice/decklink*cpp

Found-by: Zeranoe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/huffyuvdec: apply vertical filter in steps of 1 line for interlaced BGRA

Fixes out of array read
Fixes: signal_sigsegv_3287332_2301_cov_2994954934_huffyuv.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf/avio: clarify the buffer parameter of avio_alloc_context

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc: add entry for APNG demuxer where needed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'f20141d73f08ed0c8e875bd993a7143e19b266e3'

* commit 'f20141d73f08ed0c8e875bd993a7143e19b266e3':
  vorbis_parser: Include stdint.h in the header, to make it work standalone

See: e2e36a739d3ad0d207a31c76f414a912d08b1d6d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavc/avuienc: fix mem leak in case of init failure

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
lavc/libxvid: return meaningful error codes

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
lavu/opt: handle NULL obj in av_opt_next

It indirectly also fixes av_opt_free for NULL objs.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
lavc/utils: free private options on avcodec_open2 fail

It protects leaking string/binary/dict options from priv context.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Rename sync() functions in libavformat.

Fixes compilation on Android where the sync() definition in
unistd.h interferes with the static definitions in libavformat.
avformat/apngdec: account for blend and dispose operations.

When the dimensions are the entire frame ones, and the dispose operation
is to reset to background, or the new frame overwrites the new one, then
consider the frame as a key one.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mxfdec: dont ask for samples with field dominance 0 anymore

Based on discussion and patch from
"[FFmpeg-devel] [PATCH]Do not ask for mxf samples with unknown field dominance"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/flacdec: Call ff_flacdsp_init() unconditionally

Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/flacdec: fix off by 1 error

Fixes assertion failure
Fixes: signal_sigsegv_324b284_1980_dilvie___the_dragonfly.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
movenc: Add a flag for indicating a discontinuous fragment

This allows creating a later mp4 fragment without sequentially
writing the earlier ones before (when called from a segmenter).

Normally when writing a fragmented mp4 file sequentially, the
first timestamps of a fragment are adjusted to match the
end of the previous fragment, to make sure the timestamp is the
same, even if it is calculated as the sum of previous fragment
durations. (And for the first packet in a file, the offset of
the first packet is written using an edit list.)

When writing an individual mp4 fragment discontinuously like this
(with potentially writing the earlier fragments separately later),
there's a risk of getting a gap in the timeline if the duration
field of the last packet in the previous fragment doesn't match up
with the start time of the next fragment.

Using this requires setting -avoid_negative_ts make_non_negative
(or -avoid_negative_ts 0).

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Expose the fragment index as an avoption

This allows setting the right fragment number if doing
random-access writing of fragments, and also allows reading the
current sequence number.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'ee37620b6ae4783cda637408422044b2d14a688c'

* commit 'ee37620b6ae4783cda637408422044b2d14a688c':
  movenc: Add a flag for indicating a discontinuous fragment

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa'

* commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa':
  movenc: Expose the fragment index as an avoption

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/apngdec: use packet pts and duration instead of altering stream framerate.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>