avcodec/vorbisdec: use the stored previous window type only when the actual previous is not known

Fixes Ticket3432

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5171ae781a240cac3860c20f9aefc6d1b2c61cac)
avformat/flvdec: discard inconsistent timestamps

Fixes Ticket3425

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dbc3e1109cddd7ab653dce0f7758bad17b94803d)
avidec: calculate missing bitrates from index

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 01000064c9518f76bc97b72e81aa34788d88534f)
avformat/avidec: Check required demuxing buffer sizes in guess_ni_flag()

Fixes Ticket3421

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5d75730c58f72918a41bb5abda4b448ecdd4273c)
mvformat/movenc: fix IMX

fixes Ticket3351

Tested-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 72d44f15834af68e2620a7051493359d7ee5b2c3)
ffmpeg_opt: check that a subtitle encoder is available before auto mapping streams

Fixes Ticket3470

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 25bcf24d4d0faf0191923be8afac8f67ca98b500)
avcodec/h264: be more tolerant on what pixel format changes trigger reinits

Fixes Ticket3260

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8e92ff25469f75f5c1fcbb9ba5721cea341ca34a)
avcodec/adpcm: ADPCM_IMA_DK3 packets are padded to 16-bit packet boundary

Fixes ticket #3461.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1bb17940dd242e56541775318636bcbe3eab73d)
avcodec/adpcm: squelch 'mismatch in coded sample count' warning for AV_CODEC_ID_ADPCM_EA_R2/3

These ADPCM codecs include a per-frame flag that enables a raw 16-bit mode. Therefore
the the number of samples returned by get_nb_samples() is only ever approximate.

Fixes ticket #3460.

Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7380201451a2edfb240cd356579c4c39a87cf5bd)
configure: use pkg-config to detect libbluray

The current configure fails when static libbluray is compiled with libxml2
support.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit baa650cc7946a9eb1cf5a083f61a581a97122f03)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utvideoenc: fix slice_bits size

Fixes assertion failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0a8c90202bb906747168a698b6837496f82c717c)

Conflicts:

	libavcodec/utvideoenc.c
avcodec/g2meet: fix error returns

Fixes out of array accesses

This should not affect any release

Fixes: 8ab69af9e5a7a7e20fe04cdd25c0d6e7-asan_heap-oob_e72b82_5505_cov_2278389485_g2m4.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6b53c1aa822e9c92be52a462dd0aef1c2010ce73)

Conflicts:

	libavcodec/g2meet.c
avutil/timestamp: Warn about missing __STDC_FORMAT_MACROS for C++ use

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8b02dfd37cb3bc9521fc6e1f5b5f13c80d144cd2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6c47a4e972485e5f0c812159373f703c6f1d089f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: fix sizeof(AVFrame) dependence in  avcodec_encode_audio2()

This is a bit tricky, we allocate a correctly sized AVFrame but then only
copy the compile time AVFrame size, this is to ensure that user applications
which do not use the correct av frame API dont end with out of array reads.
Note, applications using the correct API have set extended_data and the
changed code will never be executed for them.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8ab80707841a73ca7708e1e1aa97f3513fff3d35)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h263dec: Fix use of uninitialized memory from the bitstream buffer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f07cebcd910c97ff6012085c21493231752990e9)

Conflicts:

	libavcodec/h263dec.c
avformat/mov: only force parsing for video tracks if stss is empty

Fixes playback of some AAC streams, which are otherwise mangled by the
parser, and stss is typically only valid for video anyway.

Fixes a regression since e41ea866.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 019247bdc326a90bf20d3ce5d2413cc642e8bb08)
avformat/mov: fix keyframe flags for sample from chromium Issue 340865

Fixes ticket #3362.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a0911b059763b8f13c70adcbbe71e10382855104)