Commit Graph

21668 Commits

Author SHA1 Message Date
Michael Niedermayer
09de0ffeab vc1dec: Fix null pointer dereference in vc1_decode_skip_blocks()
This handles the last frame being unavailable like all the other
code in vc1dec.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 13:01:16 +01:00
Nicolas George
217b10de3f lavc/dvdsubdec: accept palette from options.
On DVDs, the palette is part of the IFO file and therefore
not available when reading from a dumped VOB file.
2012-12-05 09:25:48 +01:00
Michael Niedermayer
599ae9995f ff_emulated_edge_mc: fix handling of w/h being 0
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 03:45:10 +01:00
Michael Niedermayer
8bf16e677f ffv1enc: allow encoding with 1 slice for CIF and smaller in version 3
the default is still 4 slices for any resolution, this just allows the user
to force 1 slice.
This in my quick test improves compression by 1% for a 320x240 sample

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 01:22:43 +01:00
Peter Ross
59fe5a339b iff decoder: DEEP TVDC 32-bit decoder
Signed-off-by: Peter Ross <pross@xvid.org>
2012-12-04 20:53:26 +11:00
Reimar Döffinger
e2fc6a01f6 libspeex: allow custom sample rates again.
This was broken by 3b061c5e10
Fixes trac issue #1974.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-12-03 19:59:04 +01:00
Paul B Mahol
0a8360c4f9 takdec: add .sample_fmts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-03 15:21:19 +00:00
Paul B Mahol
694dc6251e shorten: update .sample_fmts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-03 15:13:35 +00:00
Piotr Bandurski
7e93b0ba4b ra144enc: reject unsupported sample rates 2012-12-03 10:03:27 +00:00
Michael Niedermayer
211372e86d Merge commit '0b300daad2f5cb59a7c06dde5ac701685e6edf16'
* commit '0b300daad2f5cb59a7c06dde5ac701685e6edf16':
  h264: error out on unset current_picture_ptr for h->current_slice > 0
  avprobe: report per stream bit rate if set by the decoder
  aac: avoid a memcpy in sbr_qmf_analysis

Conflicts:
	avprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-03 01:56:47 +01:00
Michael Niedermayer
9c208b404c vp56: Ignore reconfiguration from the alpha plane.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-03 01:37:40 +01:00
Janne Grunau
0b300daad2 h264: error out on unset current_picture_ptr for h->current_slice > 0
Fixes a segfault with fuzzed sample sample_varPAR_s11622_r001-02.avi.

CC: libav-stable@libav.org
2012-12-02 23:24:53 +01:00
Christophe Gisquet
e32bea8eb4 aac: avoid a memcpy in sbr_qmf_analysis
Swapping buffer indices allows saving one memcpy that accounts for 1% of the
runtime, according to oprofile.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-02 21:07:48 +01:00
Michael Niedermayer
936eaa89be h264: check for integer overflow, fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-02 20:44:58 +01:00
Paul B Mahol
49435d3888 gifdec: read pixel aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-02 16:59:11 +00:00
Michael Niedermayer
ff7e2342bb dcadec: fix reading from prior to an array
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-02 04:01:41 +01:00
Michael Niedermayer
77693c541a xxan: more complete ybuf checks, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-02 00:48:07 +01:00
Michael Niedermayer
aae4780362 vmnc: Check for integer overflow
Fixes null pointer dereference and potential out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 22:25:50 +01:00
Michael Niedermayer
3b2cd83a82 dcadec: check lfe field
Fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 22:10:42 +01:00
Michael Niedermayer
7389bb12e6 svq1dec: update w/h only if the header is successfully parsed.
Prevents inconsistency and out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 20:19:09 +01:00
Stefano Sabatini
c9ff32215b lavu/opt: allow to set sample and pixel format with av_opt_set_int()
This change requires the user to specify min and max value, and makes
possible to prevent the user to set AV_{SAMPLE,PIX}_FMT_NONE if
forbidden.

Add required ifdeffery in case of mixed libraries, when libavutil is
updated but not the other libraries.

This is a followup of 08d0969c14.
2012-12-01 19:33:30 +01:00
Paul B Mahol
2152b60f39 gifdec: use av_fast_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 10:53:22 +00:00
Paul B Mahol
6b11ae7112 shorten: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 10:17:50 +00:00
Paul B Mahol
e4af8ed8c7 ws-snd1: return meaningful error code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 10:17:45 +00:00
Paul B Mahol
679c7578a6 wnv1: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 10:17:20 +00:00
Paul B Mahol
51bcf8ac85 xldec: K&R formatting cosmetics
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 10:17:20 +00:00
Paul B Mahol
24e5cb4836 xldec: return meaningful error code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 10:17:16 +00:00
Paul B Mahol
3b56ed3478 motionpixels: use meaningful error code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 09:18:21 +00:00
Michael Niedermayer
f0695b09dd pcmdec: check codec_id
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 02:36:28 +01:00
Michael Niedermayer
a7ee6281f7 qdm2: check array index before use, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 00:00:08 +01:00
Michael Niedermayer
991e23519a aacps: check iid/icc_par more completely.
Fixes global out of array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 22:23:49 +01:00
Michael Niedermayer
7205e896a1 dxa: check reference frame availability before use.
Fix NULL pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 22:23:49 +01:00
Michael Niedermayer
2c69fcc2ff smacker: more complete vlc length check, fixes out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 16:14:18 +01:00
Michael Niedermayer
50cbe09d8c smacker: check smacker_decode_tree() return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 16:14:18 +01:00
Paul B Mahol
d56b15017a undo file modifiers that suck in
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-30 15:00:35 +00:00
Vitaliy E Sugrobov
005cb97e3e Move some definitions to header file.
Share them with upcoming demuxer module.

Signed-off-by: Vitaliy E Sugrobov <vsugrob@hotmail.com>
2012-11-30 14:33:58 +00:00
Vitaliy E Sugrobov
de0cb7f070 Additional checks to prevent overread.
Check for availability of some required amount of bytes in buffer before
reading further.

Signed-off-by: Vitaliy E Sugrobov <vsugrob@hotmail.com>
2012-11-30 14:33:58 +00:00
Vitaliy E Sugrobov
91499f4ee8 Prepare gif decoder for use in conjunction with gif demuxer.
Add capability of reading multiple frames instead of only first.
Implement support for different gif frame 'disposal methods'.
Add option that allows to change background color resulting from
conversion of gif with transparency to any other format which
not support it.
Also bump lavc minor version.

Signed-off-by: Vitaliy E Sugrobov <vsugrob@hotmail.com>
2012-11-30 14:33:58 +00:00
Vitaliy E Sugrobov
c5fe41c768 Add meaningful error codes and constants.
Replace literals with named constants in several pieces of code
like 'return -1' and 'case 0xab'.
Change the way decoder handles absence of image data in a file:
notify gif_decode_frame() caller with got_picture set to zero
instead of returning -1.

Signed-off-by: Vitaliy E Sugrobov <vsugrob@hotmail.com>
2012-11-30 14:33:58 +00:00
Michael Niedermayer
db29a7c7c2 Merge commit '9d46eaec7a90bd8f5cd9e45398c6d17804182320'
* commit '9d46eaec7a90bd8f5cd9e45398c6d17804182320':
  build: The FLAC encoder also depends on the flacdsp code
  img2: K&R formatting cosmetics
  h264: check context state before decoding slice data partitions
  flashsv: make sure data for zlib priming is available

Conflicts:
	libavcodec/Makefile
	libavformat/img2.c
	libavformat/img2dec.c
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 14:49:13 +01:00
Paul B Mahol
d4c59f77b6 adpcm/thp: cosmetics: reindent
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-30 10:48:37 +00:00
Michael Niedermayer
d9bec3b6a2 lavc: fix duplicate stats_out line.
Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 05:31:41 +01:00
Michael Niedermayer
bc16031a41 mjpegdec: print error message when quant_index is invalid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 04:17:03 +01:00
Michael Niedermayer
a2f680c7bc mjpegdec: check h/v_count, fix context becoming inconsistent and causing out of array accesses.
This also fixes a long standing comment in the code.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-30 04:17:03 +01:00
Stefano Sabatini
08d0969c14 lavu/opt: change the way default pixel and sample format value is set
Use the i64 field rather than the string value. Using a string to set a
default sample/pixel format is weird, also the new interface is more
consistent with the rest of the API.

This is technically an API break, but hopefully there are no applications
using this feature outside of FFmpeg. In order to save backward
compatibility with mixed libraries in case libavutil is updated but not
the other libraries, some ifdeffery hacks are added.

Note that the version check is only performed when class->version != 0,
since if it is not defined then we assume that no version was defined and
the class is not affected by the change.

We will luckily get rid of the hack at the next major bump.
2012-11-30 00:01:53 +01:00
Michael Niedermayer
0b28abf903 vble: check packet size.
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-29 23:12:42 +01:00
Piotr Bandurski
0b14c197f1 iff: mention all decoders 2012-11-29 19:16:10 +00:00
Diego Biurrun
9d46eaec7a build: The FLAC encoder also depends on the flacdsp code
Fixes linking with only the FLAC encoder enabled.
2012-11-29 17:15:57 +01:00
Michael Niedermayer
6abb9a901f huffyuvdec: check width more completely, avoid out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-29 15:56:36 +01:00
Michael Niedermayer
27eada287a tiffdec: better checks for bitstream offsets, fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-29 15:35:05 +01:00