huffyuvdec: check for and propagate failures from inside generate_joint_tables()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
huffyuvdec: Skip len==0 cases

Fixes vlc decoding for hypothetical files that would contain such cases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dict.c: use av_mallocz instead of av_realloc

Memory passed to av_realloc must come from malloc,
calloc or realloc, and not e.g. memalign. realloc(3):

The realloc() function changes the size of the memory block pointed to
by ptr to size bytes. (...) Unless ptr is NULL, it must have been
returned by an earlier call to malloc(), calloc() or realloc().

The issue has been found by debugallocation, a part of google-perftools:
http://code.google.com/p/gperftools/ .

This makes fate pass when using LD_PRELOAD-ed debugallocation.

See also earlier discussion
http://ffmpeg.org/pipermail/ffmpeg-devel/2013-January/137234.html

Signed-off-by: Paweł Hajdan, Jr <phajdan@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
sanm: Check MV before using them.

Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix 1bpp palettized png with width not a multiple of 8.

Fixes ticket #2204.
dirac/x86: fix compile without inline asm

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dirac/x86: fix compile without yasm

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Correctly mark non-default streams when muxing matroska.

Fixes ticket #1815.

Reviewed-by: Hendrik Leppkes
movenc: Simplify code by using avio_wb24

Signed-off-by: Martin Storsjö <martin@martin.st>
dsputil: remove unused functions copy_block{2, 4, 8, 16}.
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  movenc: Simplify code by using avio_wb24
  bfin: unbreak compilation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mpegvideo_enc: factor expression out

Fixes "warning: dc[0..5] may be used uninitialized in this function"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
msrledec: move output pointer test up

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
msrledec: move loop into switch

speeds up code and allows more simplifications

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

More speedup and fixes 'may be used uninitialized in this function' warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avstring: fix "warning: return discards const qualifier from pointer target type"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mss3: prevent AC state from becoming invalid in rac_normalise()

Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dnxhddec: fix integer overflow / index check

Fixes out of array read

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

Memory passed to av_realloc cannot be allocated using memalign.

From realloc(3):

The realloc() function changes the size of the memory block pointed to
by ptr to size bytes. (...) Unless ptr is NULL, it must have been returned
by an earlier call to malloc(), calloc() or realloc().

The issue has been found by debugallocation, a part of google-perftools:
http://code.google.com/p/gperftools/ .

Signed-off-by: Paweł Hajdan, Jr <phajdan@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
fixup_vorbis_headers: add missing malloc failure check

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