iff: validate CMAP palette size

Fixes CVE-2013-2495

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
(cherry picked from commit 50c449ac24fbb4c03c15d2e2026cef2204b80385)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
fate: fetch samples that match the release series

The idea is to ensure that 'make fate-rsync' always fetches the fate
samples that work with this release.
add missed CVE reference in 9.2 release
update Changelog
Only test the first frame for missing aac_adtstoasc bistream filter.

Many players ignore broken aac frames, so don't abort mov or flv
muxing when encountering one, just print a warning instead.

Fixes ticket #2380.
(cherry picked from commit 1741fece7073f51efdd837a4f307ea2cdf3d1cfb)
Prepare for 9.5 Release
flvdec: use the correct audio codec id when parsing metadata

(cherry picked from commit c3d015775388882b8a122afc337ea35108f652be)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
flvdec: read audio sample size and channels metadata

This is needed in order for the FLV demuxer not to detect a codec change when
using the "flv_metadata" option.
(cherry picked from commit e46a2a7309d8e8b8c1573047731dea77695d0ce1)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
configure: Refactor dxva2api.h dependency declarations

(cherry picked from commit 215cdd35efd625ec28ef5846f1692b18f7c2c230)

Fixes Bug: #482
vp8: Fix pthread_cond and pthread_mutex leaks

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 1d6e618939c1ba9c333d513fc7826719dae34031)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
oma: Validate sample rates

The sample rate index is 3 bits even if currently index 5, 6 and 7 are
not supported.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 0933fd1533560fbc718026e12f19a4824b041237)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
configure: Enable hwaccels without external dependencies by default.

(cherry picked from commit 2e2ec667416d8ed345491ac360fccc94e7a4772f)

This is a fixup for f074618 to reenable auto-detection of dxva in the
build environment.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Write broken aac frames to mov files instead of skipping them.

Fixes decoding with picky media players.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b448c0a68d0cc7dfef736267dfdaed0e213c020b)
smacker: fix off by one error

Regression since a93b572ae4f517ce0c35cf085167c318e9215908.

Fixes #2426.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit e3cc92a623a6ece42816c7a692c8815688a99ab0)
Skip padding in an id3 tag in aiff files.

Fixes ticket #2430.

Reviewed-by: Matthieu Bouron
(cherry picked from commit db2d3a90825025b2f5da85792e1df33280c61391)
avfiltergraph: check for sws opts being non-NULL before using them.

Avoid snprintfing a NULL pointer.

CC: libav-stable@libav.org
(cherry picked from commit 6e3c13a559e9ff300b5ca60e1d503e594d7f055c)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
matroska: fix a corner case in ebml-lace parsing

Make sure we notice when the lace_size[n] is a negative value.

CC: libav-stable@libav.org
(cherry picked from commit 8a96df7b70be509dae9ceec82d2c10a20361356d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
matroska: Update the available size after lace parsing

Fix heap-buffer-overflow in matroska_parse_block for
corrupted real media in mkv files.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit fc43c19a567aa945398dccb491d972c11ec2a065)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
matroska: pass the lace size to the matroska_parse_rm_audio

Each lace must be independent according to the specification.

Fix heap-buffer-overflow in matroska_parse_block for
corrupted real media in mkv files.

Stricter check than fc43c19a567aa945398dccb491d972c11ec2a065

CC: libav-stable@libav.org
(cherry picked from commit 25a80a931a3829f9d730971dbd269aa39cc273f6)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
xmv: do not leak memory in the error paths in xmv_read_header()

CC: libav-stable@libav.org
(cherry picked from commit f8080bd13b5f7fc48204b17fa59a5ce9feb15f07)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>