17620 Commits

Author SHA1 Message Date
Michael Niedermayer
492eb0aa14 Merge remote-tracking branch 'qatar/release/0.8' into release/0.10
* qatar/release/0.8:
  Update Changelog
  h264: check ref_count validity for num_ref_idx_active_override_flag
  h264: check context state before decoding slice data partitions
  oggdec: free the ogg streams on read_header failure
  oggdec: check memory allocation
  Fix uninitialized reads on malformed ogg files.
  rtsp: Recheck the reordering queue if getting a new packet
  opt: avoid segfault in av_opt_next() if the class does not have an option list
  alacdec: do not be too strict about the extradata size

Conflicts:
	Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 02:33:07 +01:00
Michael Niedermayer
c961ce969a Merge commit 'a335ffd7f4cdaaa6a8fe4187f6f06b0418eea19a' into release/0.10
* commit 'a335ffd7f4cdaaa6a8fe4187f6f06b0418eea19a':
  h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles
  h264: check sps.log2_max_frame_num for validity
  h264: slice-mt: get last_pic_dropable from master context
  ppc: always use pic for shared libraries
  h264: error out on unset current_picture_ptr for h->current_slice > 0
  flashsv: make sure data for zlib priming is available
  h264: enable low delay only if no delayed frames were seen
  flashsv: check for keyframe before using differential coding
  lavf: avoid integer overflow in ff_compute_frame_duration()
  aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN.
  APIchanges: Fill in missing commit hashes

Conflicts:
	doc/APIchanges

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 02:20:20 +01:00
Michael Niedermayer
52cea9ce92 Merge commit '01a4e7f623a2e6dc95862f9a56c777f058d7bfaf' into release/0.10
* commit '01a4e7f623a2e6dc95862f9a56c777f058d7bfaf':
  lavf: Bump minor version to distinguish branch and master version numbers
  vp6: properly fail on unsupported feature
  mp3: properly forward mp_decode_frame errors
  mpeg12: do not decode extradata more than once.
  indeo3: when freeing buffers, set pointers referencing them to NULL as well
  indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder
  avconv: fix copying per-stream metadata.
  id3v2: fix reading unsynchronized frames.
  h264: Fix parameters to ff_er_add_slice() call
  build: fix 'clean' target

Conflicts:
	avconv.c
	libavcodec/mpeg12.h
	libavformat/id3v2.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 01:58:54 +01:00
Michael Niedermayer
ea3b68c99d Merge commit 'dcf8f259d107838ff3778343dcb762398130a1a3' into release/0.10
* commit 'dcf8f259d107838ff3778343dcb762398130a1a3':
  build: Add 'check' target to run all compile and test targets.
  Ignore generated aviocat tool.
  avconv: only apply presets when we have an encoder.
  flacenc: ensure the order is within the min/max range in LPC order search
  yuv4mpeg: reject unsupported codecs
  vp8: reset loopfilter delta values at keyframes.
  vp56: release frames on error
  vp56: make parse_header return standard error codes
  ivi_common: check that scan pattern is set before using it.
  Prepare for 0.8.5 Release
  x86: Require an assembler able to cope with AVX instructions

Conflicts:
	RELEASE
	avconv.c
	doc/developer.texi
	libavformat/yuv4mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 01:29:26 +01:00
Janne Grunau
adef01c370 h264: check ref_count validity for num_ref_idx_active_override_flag
Fixes segfault in the fuzzed sample bipbop234.ts_s226407.
CC: libav-stable@libav.org
(cherry-picked from commit 6e5cdf26281945ddea3aaf5eca4d127791f23ca8)
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2013-01-12 17:59:41 +01:00
Janne Grunau
06312bbb10 h264: check context state before decoding slice data partitions
Fixes mov_h264_aac__Demo_FlagOfOurFathers.mov.SIGSEGV.4e9.656.

Found-by: Mateusz "j00ru" Jurczyk
CC: libav-stable@libav.org
(cherry-picked from commit c1fcf563b13051f280db169ba41c6a1b21b25e08)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:41 +01:00
Victor Lopez
a335ffd7f4 h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles
Fixes bug 396.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:40 +01:00
Janne Grunau
f620c12067 h264: check sps.log2_max_frame_num for validity
Fixes infinite or long taking loop in frame num gap code in
the fuzzed sample bipbop234.ts_s223302.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:40 +01:00
Janne Grunau
1d98811b95 h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:40 +01:00
Justin Ruggles
77e6676d3e alacdec: do not be too strict about the extradata size
Sometimes the extradata has duplicate atoms, but that shouldn't prevent
decoding. Just ensure that it is at least 36 bytes as a sanity check.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:40 +01:00
Janne Grunau
f1b3cc02ec 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
(cherry picked from commit 0b300daad2f5cb59a7c06dde5ac701685e6edf16)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:40 +01:00
Janne Grunau
b6592b402c flashsv: make sure data for zlib priming is available
Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:40 +01:00
Janne Grunau
6cd92c3880 h264: enable low delay only if no delayed frames were seen
Dropping frames is undesirable but that is the only way by which the
decoder could return to low delay mode. Instead emit a warning and
continue with delayed frames.
Fixes a crash in fuzzed sample nasa-8s2.ts_s20033 caused by a larger
than expected has_b_frames value. Low delay keeps getting re-enabled
from a presumely broken SPS.

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

Conflicts:

	libavcodec/h264.c
2013-01-12 17:59:40 +01:00
Janne Grunau
522e97bd9e flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:39 +01:00
Alex Converse
a4a63bf5b5 aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN.
Found-by: pawlkt
CC: libav-stable@libav.org
Fixes: CVE-2012-5144
(cherry picked from commit 6d5b0092678b2a95dfe209a207550bd2fe9ef646)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-12 17:59:39 +01:00
Piotr Bandurski
fe0e64ca64 tiffdec: Use the correct height field.
Fixes Ticket913

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4784a135b2b0fe4d1b4c6256bd37265fc45aed3d)

Conflicts:
	libavcodec/tiff.c
2013-01-07 00:34:31 +01:00
Luca Barbato
3e700cc66b vp6: properly fail on unsupported feature
Interlacing is not supported at all and mismanaged down the normal
codepaths causing possible buffer management issues.

Fixes: CVE-2012-2783
(cherry picked from commit be75fed9755c1285ba084574aff2d7ee0f81110d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-05 12:02:22 +01:00
Luca Barbato
a5290800f5 mp3: properly forward mp_decode_frame errors
The function can return either a parsing error or a memory management
error.

Fixes: CVE-2012-2797

(cherry picked from commit 9ab0874ea8b6774c6f5470dba2b5b4615a610d0d)

Conflicts:

	libavcodec/mpegaudiodec.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-05 11:49:25 +01:00
Anton Khirnov
56c1e18a52 mpeg12: do not decode extradata more than once.
Fixes CVE-2012-2803.

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

Conflicts:

	libavcodec/mpeg12.c
2013-01-05 00:35:58 +01:00
Kostya Shishkov
c55ca98769 indeo3: when freeing buffers, set pointers referencing them to NULL as well
Related to CVE-2012-2804
(cherry picked from commit bc00da27010ed9e5dbe47e5b6fae3dcddb999d78)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-05 00:27:34 +01:00
Kostya Shishkov
e5ea6539d4 indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder
Related to CVE-2012-2804
(cherry picked from commit fc417db3f162d5269c0d22f8e467da4afa67c20a)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-05 00:26:25 +01:00
Janne Grunau
52adbc0e17 h264: Fix parameters to ff_er_add_slice() call
s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394.

(cherry picked from commit e6160bda98641b7d4f86de15761ad2a962f21a36)

Conflicts:

	libavcodec/h264.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-05 00:25:31 +01:00
Justin Ruggles
0ba0e31955 flacenc: ensure the order is within the min/max range in LPC order search
This fixes use of uninitialized values when the FLAC encoder uses the
2-level, 4-level, and 8-level search methods. Fixes failure of the
fate-flac-24-comp-8 test when run using valgrind.
(cherry picked from commit 3a2731cbd31d0c5681ddbc7c78edd5c53c4d0032)

Conflicts:

	libavcodec/flacenc.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-02 20:44:31 +01:00
Sami Pietila
9837f19693 vp8: reset loopfilter delta values at keyframes.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>

(cherry picked from commit 0bf511d579c7b21f1244eec688abf571ca1235bd)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-02 20:29:41 +01:00
Luca Barbato
211badf068 vp56: release frames on error
Fixes CVE-2012-2783

CC: libav-stable@libav.org

(cherry picked from commit f33b5ba63eee96c9d1c7f0e568169cb0c3694238)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-02 20:28:18 +01:00
Luca Barbato
145317d220 vp56: make parse_header return standard error codes
Returning 0 for failure is misleading.

CC: libav-stable@libav.org

(cherry picked from commit bb675d3ac6d722d5e117ae9042a996b55ca05b1d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-02 20:28:08 +01:00
Anton Khirnov
3fca5799c6 ivi_common: check that scan pattern is set before using it.
Fixes CVE-2012-2791.

CC: libav-stable@libav.org

(cherry picked from commit deabb52ab4c1fdb3dd319f3980b1489a182011f1)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-02 20:25:32 +01:00
Clément Bœsch
c3d7c805bc lavc/ass_split: check for NULL pointer in ff_ass_split_override_codes().
This is consistent with the other ff_ass_split_* functions.

It also fixes a crash when trying to split a dialog with text=NULL
(which seems to happen when the text of the dialog is empty); basically,
this commit fixes crashes when trying to encode an empty text subtitle
dialog (see subrip and mov_text encoders).

Fixes Ticket2048.
(cherry picked from commit c83002a4f8042ccfa0688a9a18e8fa0369c1fda8)
2013-01-01 18:22:20 +01:00
Michael Niedermayer
cdb376d775 mpeg1video: fix regression with slices != threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a01679586cd9ac8470b81c0299fc7e13fd980d64)
2012-12-13 00:26:08 +01:00
Michael Niedermayer
6773269f4c mpeg1video: support multi threaded slice encoding.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 03df9720168335482f00898fc16b56ff4878d0e7)

Conflicts:
	libavcodec/mpeg12enc.c
2012-12-13 00:25:48 +01:00
Janne Grunau
213f651498 h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
(cherry picked from commit 24c62ea7a5df44804be88150aa0c45e6796b5da9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 16:22:49 +01:00
Michael Niedermayer
5b5e61a0bf noise_bsf: fix division by 0
Fixes CID733737
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 93ef29b6f47eda7d73eb9e71628f1f1abb64266d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:19:56 +02:00
Thilo Borgmann
7f1fb8d2a3 alsdec: fix clipping of weightings for MCC decoding
Fixes CID717905
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit feaff427c0df015146f660199453bd8c0314e677)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:19:56 +02:00
Michael Niedermayer
75a11e950f mpegvideo: fix motion_val checks
Fixes CID604124
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 20ec0d2a750a804f50c090cf6e6509db8ff9cadd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:19:56 +02:00
Michael Niedermayer
e6fa08f14e flashsv: check deflateInit() return value
Fixes CID703620
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b3eb4f54c0d091ed518b38a5b90183d0d55fa729)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:19:56 +02:00
Michael Niedermayer
400b23beab dnxhddata_ Fix mixup of sizeof() and array elements in ff_dnxhd_find_cid()
Fixes CID717910
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1037e484f0f1c45ab0a398c78985d3b91daa410c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:19:56 +02:00
Michael Niedermayer
cff9f07d39 ffv1: make sure gob_count is not 0
Fixes division by 0
Fixes CID733736

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 670b927aa22125a20b7915014ae41335cbf20ec4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:19:56 +02:00
Michael Niedermayer
35b15a0da8 jpegls: increase run_index to 4
Fixes part of CID717913
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8dc89944270aa223a960218e62e88164f8eda359)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:12:44 +02:00
Michael Niedermayer
fa73f547a0 jpegls: fix off limit
Fixes part of CID717913
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4acfe3d193c741126bd7f5c1a32a911e00595ecc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:12:42 +02:00
Michael Niedermayer
db4903f4e4 ffv1: avoid checking a double for equality
if 0.0 != 0.0 a out of array read would occur, equal checks
with floating point may behave in such odd ways, though
this is very unlikely in a real implementation of a compiler

Fixes: CID718936
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 54b2d317ed99622efa07b10aca217e1a083105d9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:12:40 +02:00
Michael Niedermayer
8b64036038 aacsbr: change order of operation to prevent out of array read
Fixes CID732250
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c2340831b8e9032716acb0aab4893d3cc500213a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:12:36 +02:00
Michael Niedermayer
f2d56c2eeb motion_est: more complete SAB diamond size check
This makes no difference with the current #defines

Fixes CID732255
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3a48e38ad0e37d89065843548414d367e70593bf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:09:42 +02:00
Paul B Mahol
e6dfaf7bb8 truemotion2: remove unreachable code
Fixes CID610345.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit caa7e24eb1d47a0dfeb9783909bce7df6d3f5482)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:09:39 +02:00
Paul B Mahol
c9df500190 bmp: unbreak non BMP_RGB compression for v4 and v5
Fixes CID733728 & CID733729.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 313b40efbd63a2c6b9933519ba2b208f1031a9d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:09:27 +02:00
Michael Niedermayer
d12bf6fc9e libvpxenc: fix memleak on error path
Fixes CID733795
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 104b1d9e103f90485e894b20dd5bb3f1964fe5f3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:09:22 +02:00
Janne Grunau
c279e37e90 flashsv: propagate inflateReset() errors
Fixes CID717493.
(cherry picked from commit c466eb174699bd912b9cf601e5b1a5da87e83a33)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:09:10 +02:00
Janne Grunau
cc88dacc1a g722enc: fix size argument in memset
Fixes CID700725.
(cherry picked from commit f1de23faaa61ecf3706055f2da97f5b92aa07d9c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 21:09:07 +02:00
Michael Niedermayer
988910a277 Merge remote-tracking branch 'qatar/release/0.8' into release/0.10
* qatar/release/0.8:
  svq3: replace unsafe pointer casting with intreadwrite macros
  Update Changelog for the 0.8.4 Release
  lavc: remove stats_out from the options table.
  Prepare for 0.8.4 Release
  tiffenc: Check av_malloc() results.
  mpegaudiodec: fix short_start calculation
  h264: avoid stuck buffer pointer in decode_nal_units
  vf_pad/scale: use double precision for aspect ratios.
  yuv4mpeg: return proper error codes.
  smacker audio: sign-extend the initial 16-bit predicted value

Conflicts:
	Changelog
	RELEASE
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 17:18:59 +02:00
Michael Niedermayer
d6a55ab016 Merge commit 'be209bdabb11c59de17220bdbf0bf9c9f7cc16f5' into release/0.10
* commit 'be209bdabb11c59de17220bdbf0bf9c9f7cc16f5':
  vf_pad: don't give up its own reference to the output buffer.
  libvorbis: use VBR by default, with default quality of 3
  libvorbis: fix use of minrate/maxrate AVOptions
  h264: fix deadlocks on incomplete reference frame decoding.
  cmdutils: avoid setting data pointers to invalid values in alloc_buffer()
  avidec: return 0, not packet size from read_packet().
  wmapro: prevent division by zero when sample rate is unspecified
  vc1dec: check that coded slice positions and interlacing match.
  alsdec: fix number of decoded samples in first sub-block in BGMC mode.
  alsdec: remove dead assignments
  alsdec: Fix out of ltp_gain_values read.
  alsdec: Check that quantized parcor coeffs are within range.
  alsdec: Check k used for rice decoder.

Conflicts:
	avconv.c
	libavcodec/h264.c
	libavcodec/libvorbis.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 17:02:46 +02:00
Michael Niedermayer
36487066ee Merge commit '15c2e8027f4827018608badb1bff1294af1810e4' into release/0.10
* commit '15c2e8027f4827018608badb1bff1294af1810e4':
  wav: do not fail on empty INFO tags
  cavsdec: check for changing w/h.
  indeo4: update AVCodecContext width/height on size change
  avidec: use actually read size instead of requested size
  wmaprodec: check num_vec_coeffs for validity
  lagarith: check count before writing zeros.
  indeo3: fix out of cell write.
  indeo5: check tile size in decode_mb_info().
  indeo5: prevent null pointer dereference on broken files
  indeo5dec: Make sure we have had a valid gop header.
  indeo4/5: check empty tile size in decode_mb_info().
  ivi_common: make ff_ivi_process_empty_tile() static.

Conflicts:
	libavcodec/indeo5.c
	libavformat/wav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 16:29:54 +02:00