Merge remote-tracking branch 'qatar/master'

* qatar/master:
  idcin: fix memleaks in idcin_read_packet()

Conflicts:
	libavformat/idcin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mux: simplify chunking interleaver code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mux: de-obfuscate chunked interleaver checks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mux/chunked interleaver: better align duration chunks.

This code causes the chunking to tend toward more optimal
alignment between streams.
The first chunks can still be less optimal aligned
Make the latm decoder less verbose on initialisation.

Reviewed-by: Paul B Mahol
Only skip MLP header in mpeg files if the codec actually is MLP.

Fixes PCM audio in Kansas Pheasant Hunt 2000 mpg file.
Reported-by: Mashiat Sarker Shakkhar
theora: Skip zero-sized headers

This fixes a regression since d9cf5f51 with theora over RTP
(possibly with other variants of theora as well).

In theora over RTP, the second of the 3 headers turns out to be
0 bytes long, which prior to d9cf5f51 worked just fine. After
d9cf5f51, reading from the bitstream reader fails (since the reader
wasn't initialized but returned an error if initialized with 0 bits).

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
float_dsp: Add #ifdef HAVE_INLINE_ASM around vector_fmul_window

This fixes builds on 64bit MSVC.

Signed-off-by: Martin Storsjö <martin@martin.st>
.gitignore: add /doc/examples/pc-uninstalled

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Add a new function av_codec_get_tag2().

av_codec_get_tag() may return 0 both in case a codec_tag was
found and if no codec_tag was found.
The new function does not have this ambiguity.
Use new function av_codec_get_tag2() in ffmpeg.c.

Fixes ticket #1953.
libcdio: support recent cdio-paranoia

Upstream decided to split the paranoia interface and move the headers
accordingly.
lavc: support ZenoXVID custom tag

Looks like this kind of samples are produced by certain Russian
equipment.
rv30: fix masking in rv30_loop_filter()

The mask `x && (1 << y)' is incorrect and always yields true.

The correct form should be `x & (1 << y)'.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
fate: update ref after rv30_loop_filter fix
mpegvideo: reset context state on failed thread update.

Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mlpdec: dont leave a invalid huff_lsb in the context.

Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavr: call mix_function_init() in ff_audio_mix_set_matrix()

This is needed if a custom matrix is set by the user after opening the
AVAudioResampleContext because the matrix channel count can change if
different mixing coefficients are used.

CC:libav-stable@libav.org
lavr: always reset mix function names and pointers in mix_function_init()

CC: libav-stable@libav.org
avcodec_decode_audio: do not trust the channel layout, use the channel count.

Fixes memory corruption

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>