alsdec: check opt_order.

Fixes out of array write in quant_cof.
Also make sure no invalid opt_order stays in the context.

Fixes CVE-2012-2775

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
alsdec: Check k used for rice decoder.

Values that fail this check will cause failure of decode_rice()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
alsdec: Check that quantized parcor coeffs are within range.

ALS spec:
	11.6.3.1.1 Quantization and encoding of parcor coefficients
	...
	In all cases the resulting quantized values ak are restricted to the range [-64,63].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
alsdec: Fix out of ltp_gain_values read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
alsdec: fix number of decoded samples in first sub-block in BGMC mode.

Fixes CVE-2012-2790

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
alsdec: check return values.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
alsdec: fix misplaced parentheses.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
dirac_arith: Fix unprotected inline asm

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Remove code that duplicates existing code a few lines down.

This also fixes a potential crash since s->pb can be NULL.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libx264: connect AVCodecContext.rtp_payload_size to x264_params_t.i_slice_max_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libx264: feed x264_param_apply_profile from AVCodecContext.profile in absence of other information

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
When copying pkt side_data, don't forget size, type

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
configure: include flags in nm variable

This simplifies ensuring proper flags are used when the default
is overridden by the system or on the command line.

Signed-off-by: Mans Rullgard <mans@mansr.com>
get_cabac_inline_x86: workaround clang bug with disabled optimizations

gcc produces binary identical output relative to before this change

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
nsvdec: change 2 commented assert() to av_assert()

they keep showing up if i grep for non av assert()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swscale: change assert() to av_assert()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dsputil: change assert(8) to av_assert2(8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc: fix typos in filter documentation

Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
flvenc: silence bogus warning

The compiler fails to figure out that enc->codec_type can only
have 3 different values.
Thus when an if/else is encountered it triggers on the possibility
of the else case has not initialized the flags variable.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Fix typo in targa encoder comment