ffmpeg.git
7 years agoFix compilation with yasm-0.6.2.
Carl Eugen Hoyos [Thu, 12 Jan 2012 15:53:42 +0000 (16:53 +0100)]
Fix compilation with yasm-0.6.2.

7 years agoUpdate for 0.9.1 n0.9.1
Michael Niedermayer [Thu, 5 Jan 2012 02:00:56 +0000 (03:00 +0100)]
Update for 0.9.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovc1dec: fix invalid memory access for small video dimensions
John Brooks [Sun, 11 Dec 2011 09:37:21 +0000 (02:37 -0700)]
vc1dec: fix invalid memory access for small video dimensions

For small video dimensions, these calculations of the upper bound
for pixel access may have a negative result. Using an unsigned
comparison to bound a potentially negative value only works if
the greater operand is non-negative. Fixed by doing edge emulation
when the upper bound is probably negative, everywhere that this
pattern appears.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
(cherry picked from commit d209c27b09234cc40bbdbd680aa502b493edf595)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorv34: fix invalid memory access for small video dimensions
John Brooks [Wed, 4 Jan 2012 06:27:35 +0000 (23:27 -0700)]
rv34: fix invalid memory access for small video dimensions

For small video dimensions calculations of the upper bound for pixel
access may result in negative value. Using an unsigned comparison
works only if the greater operand is non-negative. This is fixed by
doing edge emulation explicitly for such conditions.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
(cherry picked from commit aacf6b3a2fd8bc8603e3deaa6e612ea03cf08707)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRevert "rmdec: Avoid allocating huge packets"
Michael Niedermayer [Wed, 4 Jan 2012 23:51:12 +0000 (00:51 +0100)]
Revert "rmdec: Avoid allocating huge packets"

This reverts commit 66f71f3b5e2e7b6e5049bd9831c371e16aff8a53.

This causes regressions with RDT.
(cherry picked from commit c4eec85a1fa768025f88261995af08f1dba9685d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: use avg_frame_rate and packet number to exit find_stream_info
Michael Niedermayer [Wed, 4 Jan 2012 23:49:02 +0000 (00:49 +0100)]
lavf: use avg_frame_rate and packet number to exit find_stream_info

qatar does this too but clobbers the AVPacket.duration by approximate
values.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: revert commit bb99ae3ae924c942a634bec7711ec7ee11c38eb9
Michael Niedermayer [Wed, 4 Jan 2012 23:22:19 +0000 (00:22 +0100)]
lavf: revert commit bb99ae3ae924c942a634bec7711ec7ee11c38eb9

Author: Michael Niedermayer <michaelni@gmx.at>
Date:   Thu Nov 3 22:38:10 2011 +0100

    lavf: fix null pointer dereference in rdt

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This is no longer needed and causes various problems with RTSP

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: make sure ch is non zero before calling vorbis_residue_decode
Michael Niedermayer [Wed, 4 Jan 2012 20:55:52 +0000 (21:55 +0100)]
vorbis: make sure ch is non zero before calling vorbis_residue_decode

This possibly makes part of the CVE-2011-3895 fix unneeded.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: An additional defense in the Vorbis codec.
Chris Evans [Wed, 4 Jan 2012 20:53:35 +0000 (21:53 +0100)]
vorbis: An additional defense in the Vorbis codec.

BUG=101458
Review URL: http://codereview.chromium.org/8414025

Fixes second part of CVE-2011-3895

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: Fix decoder bug.
Chris Evans [Wed, 4 Jan 2012 20:51:18 +0000 (21:51 +0100)]
vorbis: Fix decoder bug.

BUG=101458
Review URL: http://codereview.chromium.org/8413019

This fixes part of 2011-3895

bigned-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 68226ed9ecef675895dc55a0c58d587014639a0e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbisdec: Make sure blocksize is not set to an invalid value.
Michael Niedermayer [Wed, 4 Jan 2012 18:22:20 +0000 (19:22 +0100)]
vorbisdec: Make sure blocksize is not set to an invalid value.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: Fix last quarter of CVE-2011-3893
Michael Niedermayer [Wed, 4 Jan 2012 16:29:34 +0000 (17:29 +0100)]
vorbis: Fix last quarter of CVE-2011-3893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoogg: Avoid the possibility to read out-of-bounds of a static global array in Vorbis
Chris Evans [Wed, 4 Jan 2012 16:24:15 +0000 (17:24 +0100)]
ogg: Avoid the possibility to read out-of-bounds of a static global array in Vorbis
decoding.

BUG=100543
Review URL: http://codereview.chromium.org/8365014
This fixes 25% of CVE-2011-3893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomkv: Fix a bug where a pointer was cached to an array that might later move due to
Chris Evans [Wed, 4 Jan 2012 15:33:34 +0000 (16:33 +0100)]
mkv: Fix a bug where a pointer was cached to an array that might later move due to
a realloc()

BUG=100492
Review URL: http://codereview.chromium.org/8366004
Fixes: 1 of 2 for CVE-2011-3893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix possible infinite loop decoding als.
Philippe Saint-Pierre [Wed, 4 Jan 2012 20:00:06 +0000 (21:00 +0100)]
Fix possible infinite loop decoding als.

Reviewed-by: Thilo Borgmann
(cherry picked from commit f0f2babca23a3d099bcd5a1e18cf5d0eae2f4ef3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: Fix vlc table check for progressive jpegs.
Michael Niedermayer [Tue, 3 Jan 2012 05:53:18 +0000 (06:53 +0100)]
jpegdec: Fix vlc table check for progressive jpegs.

Fixes Ticket834

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoelectronicarts: Pass error through ea_read_header().
Michael Niedermayer [Wed, 4 Jan 2012 03:02:22 +0000 (04:02 +0100)]
electronicarts: Pass error through ea_read_header().

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoelectronicarts: Fix division by zero. Fixes Ticket #793
Oana Stratulat [Wed, 4 Jan 2012 01:13:27 +0000 (03:13 +0200)]
electronicarts: Fix division by zero. Fixes Ticket #793

Signed-off-by: Oana Stratulat <oanaandreeastratulat@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0d3a51e5d279dd2a56c81ba7a81a70128c5a7545)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRevert "wavpack: Clip samples after shifting"
Carl Eugen Hoyos [Wed, 4 Jan 2012 19:34:45 +0000 (20:34 +0100)]
Revert "wavpack: Clip samples after shifting"

This reverts commit 8d055e9079f151f13d34e8e04f4aa7ca0273c448.

The original commit introduced ticket #871, do not import the problem
into the release branch.

7 years agovf_drawtext: select YUV color for drawbox() in case YUV colorspace is used
Stefano Sabatini [Sat, 24 Dec 2011 15:17:18 +0000 (16:17 +0100)]
vf_drawtext: select YUV color for drawbox() in case YUV colorspace is used

Fix box alpha rendering when a YUV colorspace is selected, in particular
fix trac ticket #763.
(cherry picked from commit 1858a5c25ee1ccb8089339d20138116a46cc6c77)

7 years agowavpack: determine sample_fmt before requesting a buffer
Hendrik Leppkes [Fri, 16 Dec 2011 21:41:29 +0000 (22:41 +0100)]
wavpack: determine sample_fmt before requesting a buffer

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 14165fe1256e0f11ba3d9cf574492ae528e5c9cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAdded yuva420p decoding support for libopenjpeg
Michael Bradshaw [Fri, 2 Dec 2011 21:39:26 +0000 (14:39 -0700)]
Added yuva420p decoding support for libopenjpeg

Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2ba3416362345f275c63e70f44f4cfbf9b66fb35)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAdded RGBA and YUV440 decoding support for libopenjpeg decoder
Michael Bradshaw [Thu, 1 Dec 2011 04:44:41 +0000 (21:44 -0700)]
Added RGBA and YUV440 decoding support for libopenjpeg decoder

Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3f07ef1dfff036a6b35c1605e6346bad2e17da68)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFixed openjpeg decoding bug with width/linesize issue
Michael Bradshaw [Sat, 3 Dec 2011 19:14:03 +0000 (12:14 -0700)]
Fixed openjpeg decoding bug with width/linesize issue

The original code wasn't taking into account the fact that linesize may not equal the frame's width.  This is to correct that.

Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1669e5fe3d61dc4181f96138eb4355aaaf231ea)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: non interleaved rgb ljpeg support.
Michael Niedermayer [Mon, 2 Jan 2012 18:06:46 +0000 (19:06 +0100)]
jpegdec: non interleaved rgb ljpeg support.

Fixes Ticket856

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: 9-16 bit yuv/gray ljpeg support.
Michael Niedermayer [Mon, 2 Jan 2012 16:03:24 +0000 (17:03 +0100)]
jpegdec: 9-16 bit yuv/gray ljpeg support.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: Only enable rgb mode when there are 3 components.
Michael Niedermayer [Mon, 2 Jan 2012 16:02:41 +0000 (17:02 +0100)]
jpegdec: Only enable rgb mode when there are 3 components.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobmv audio: implement new audio decoding API
Justin Ruggles [Sat, 31 Dec 2011 20:47:30 +0000 (15:47 -0500)]
bmv audio: implement new audio decoding API
(cherry picked from commit 8893fbdf7a5b941ce353fd560817ae6a2c34cfff)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoy41p encoder and decoder
Paul B Mahol [Sun, 1 Jan 2012 12:16:42 +0000 (12:16 +0000)]
y41p encoder and decoder

y41p is a packed 12-bit 4:1:1 YUV format used by Brooktree.

Fixes issue 1123 / ticket #102.

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

Conflicts:

Changelog
libavcodec/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoj2kdec: av_log formatting use %tx instead of %x
Jean First [Sun, 1 Jan 2012 21:08:17 +0000 (22:08 +0100)]
j2kdec: av_log formatting use %tx instead of %x

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b1031562351d81fb56f9338df5876dc2153d9f26)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoUpdate copyright year.
Carl Eugen Hoyos [Sun, 1 Jan 2012 04:04:25 +0000 (05:04 +0100)]
Update copyright year.
(cherry picked from commit 8dc973e6d1442e6427dfcb9817f9d15695555465)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegpsenc: Fix integer overflow of the muxrate calculation.
Michael Niedermayer [Sun, 1 Jan 2012 02:46:06 +0000 (03:46 +0100)]
mpegpsenc: Fix integer overflow of the muxrate calculation.

this should fix the failure of h264-bsf-mp4toannexb on freebsd/openbsd

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAvoid uninitialized data in lcldec when ofs is 0 in MSZH.
Reimar Döffinger [Fri, 30 Dec 2011 09:42:55 +0000 (10:42 +0100)]
Avoid uninitialized data in lcldec when ofs is 0 in MSZH.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 42a1f1d7a8cf67eed68db596d6a1e53c0c36e4ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: ffio_limit(), treat avio_size()==0 as error.
Michael Niedermayer [Sat, 31 Dec 2011 14:27:51 +0000 (15:27 +0100)]
lavf: ffio_limit(), treat avio_size()==0 as error.

This works around issues arising from inputs that claim to have a
filesize of 0.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoflvdec: Check avpriv_mpeg4audio_get_config() return
Michael Niedermayer [Sat, 31 Dec 2011 02:39:22 +0000 (03:39 +0100)]
flvdec: Check avpriv_mpeg4audio_get_config() return

value before using its output.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocache: use av_freep instead of av_free in cache_open
Jean First [Fri, 30 Dec 2011 20:08:01 +0000 (21:08 +0100)]
cache: use av_freep instead of av_free in cache_open

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 576ada791a5085b7427c9062ba4f65e811914bd0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomlp_parser: Fix infinite loop with 0 bytes_left.
Michael Niedermayer [Thu, 29 Dec 2011 20:26:30 +0000 (21:26 +0100)]
mlp_parser: Fix infinite loop with 0 bytes_left.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAvoid av_memcpy_backptr hang without extra branch.
Reimar Döffinger [Fri, 30 Dec 2011 09:37:33 +0000 (10:37 +0100)]
Avoid av_memcpy_backptr hang without extra branch.

This only happens for a "back" value of 0 which is invalid anyway,
but lcldec does not properly validate input.
Also extend the documentation to specify valid values.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 874da652b307fe0d2bec08fc5916a9a82537f40c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoljpegdec: fix point transform injection.
Michael Niedermayer [Fri, 30 Dec 2011 04:12:38 +0000 (05:12 +0100)]
ljpegdec: fix point transform injection.
Fix Ticket842

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoflvdec: Check index for being valid
Michael Niedermayer [Thu, 29 Dec 2011 22:22:41 +0000 (23:22 +0100)]
flvdec: Check index for being valid
Fixes seeking in Enigma_Principles_of_Lust.flv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agonsvdec: Check av_malloc(string_size)
Michael Niedermayer [Thu, 29 Dec 2011 20:31:22 +0000 (21:31 +0100)]
nsvdec: Check av_malloc(string_size)

This can easily be NULL as string_size can be 2g in a damaged file.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoindeo5: Fix null pointer dereferences of ref_mb
Michael Niedermayer [Thu, 29 Dec 2011 01:34:43 +0000 (02:34 +0100)]
indeo5: Fix null pointer dereferences of ref_mb

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f41a6c8f3aeb51332bb359038cb504d3fb562a52)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264_mp4toannexb_filter: pass error code through.
Michael Niedermayer [Thu, 29 Dec 2011 02:42:15 +0000 (03:42 +0100)]
h264_mp4toannexb_filter: pass error code through.

Bug-Found-by and Suggested bugfix: Tanami, Ohad
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7ae251b4d8a18bc63734e58f1baafac634c67e01)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoissdemux: Check packet_size for validity
Michael Niedermayer [Thu, 29 Dec 2011 04:05:52 +0000 (05:05 +0100)]
issdemux: Check packet_size for validity

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bf5cc805190b5811b786a454f01cccf9a7e366b9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoqpeg: Check for overread in qpeg_decode_intra.
Michael Niedermayer [Thu, 29 Dec 2011 04:16:34 +0000 (05:16 +0100)]
qpeg: Check for overread in qpeg_decode_intra.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e7c1e38ba632f7315e332dd350b38f782f428884)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoindeo5: fix division by 0 in ff_ivi_init_tiles()
Michael Niedermayer [Wed, 28 Dec 2011 20:31:00 +0000 (21:31 +0100)]
indeo5: fix division by 0 in ff_ivi_init_tiles()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoindeo5: Fix crash due to partially initialized gop vars.
Michael Niedermayer [Wed, 28 Dec 2011 19:13:00 +0000 (20:13 +0100)]
indeo5: Fix crash due to partially initialized gop vars.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoindeo5: fix null pointer crash with ref_mb
Michael Niedermayer [Wed, 28 Dec 2011 18:50:29 +0000 (19:50 +0100)]
indeo5: fix null pointer crash with ref_mb

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovcr1dec: Check that there is sufficient input data.
Michael Niedermayer [Wed, 28 Dec 2011 18:05:16 +0000 (19:05 +0100)]
vcr1dec: Check that there is sufficient input data.
Fixes crash.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agov410dec: Check for sufficient input data.
Michael Niedermayer [Wed, 28 Dec 2011 17:33:29 +0000 (18:33 +0100)]
v410dec: Check for sufficient input data.
Fixes crash

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoIndeo 4 decoder
Kostya Shishkov [Tue, 6 Dec 2011 13:50:32 +0000 (14:50 +0100)]
Indeo 4 decoder

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
(cherry picked from commit adfe0c942e71545f003f9c4d148fbf5d220681bc)

Conflicts:

Changelog
libavcodec/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix a crash when reading gray pam files.
Carl Eugen Hoyos [Wed, 28 Dec 2011 04:59:39 +0000 (05:59 +0100)]
Fix a crash when reading gray pam files.

Fixes ticket #837.
(cherry picked from commit 190a0998c353879c8f79f47678752dbb8fa62bb2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavfi: add missing check in avfilter_filter_samples()
Stefano Sabatini [Tue, 27 Dec 2011 14:15:02 +0000 (15:15 +0100)]
lavfi: add missing check in avfilter_filter_samples()

Avoid out-of-buffer data access when nb_channels is 8.
(cherry picked from commit ae21776207e8a2bbe268e7c9e203f7599dd87ddb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoshorten: validate values in fmt chunk search
Michael Niedermayer [Sun, 25 Dec 2011 11:31:23 +0000 (12:31 +0100)]
shorten: validate values in fmt chunk search

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoshorten: Fix invalid free()
Michael Niedermayer [Sun, 25 Dec 2011 11:28:50 +0000 (12:28 +0100)]
shorten: Fix invalid free()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosegafilm: fail earlier in case theres not enough bytestream left for a
Michael Niedermayer [Sun, 25 Dec 2011 03:49:23 +0000 (04:49 +0100)]
segafilm: fail earlier in case theres not enough bytestream left for a
audio packet.
This prevents a potentially large memory allocation.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavio: Fix ffio_limit() when due to seeking past the end less than 0 bytes remain.
Michael Niedermayer [Sun, 25 Dec 2011 03:48:26 +0000 (04:48 +0100)]
avio: Fix ffio_limit() when due to seeking past the end less than 0 bytes remain.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agogolomb: Fix infinite loop in svq3_get_ue_golomb()
Michael Niedermayer [Sun, 25 Dec 2011 03:15:56 +0000 (04:15 +0100)]
golomb: Fix infinite loop in svq3_get_ue_golomb()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agows_snd1: Fix wrong samples count and crash.
Michael Niedermayer [Sat, 24 Dec 2011 23:10:27 +0000 (00:10 +0100)]
ws_snd1: Fix wrong samples count and crash.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoasfdec: fix endless loop on EOF
Michael Niedermayer [Sat, 24 Dec 2011 22:21:40 +0000 (23:21 +0100)]
asfdec: fix endless loop on EOF

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosierravmd: limit packetsize to the amount that could be read.
Michael Niedermayer [Sat, 24 Dec 2011 21:06:25 +0000 (22:06 +0100)]
sierravmd: limit packetsize to the amount that could be read.
Fixes huge allocations.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovmdav: check that theres enough space for a chunk remaining.
Michael Niedermayer [Sat, 24 Dec 2011 21:03:59 +0000 (22:03 +0100)]
vmdav: check that theres enough space for a chunk remaining.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agormdec: Avoid allocating huge packets
Michael Niedermayer [Sat, 24 Dec 2011 20:26:52 +0000 (21:26 +0100)]
rmdec: Avoid allocating huge packets

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompeg4videodec: Fix division by zero in mpeg4_decode_sprite_trajectory()
Michael Niedermayer [Sat, 24 Dec 2011 19:27:54 +0000 (20:27 +0100)]
mpeg4videodec: Fix division by zero in mpeg4_decode_sprite_trajectory()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorpl: Fix near infinite loop in index reading due to missing eof check.
Michael Niedermayer [Sat, 24 Dec 2011 18:57:18 +0000 (19:57 +0100)]
rpl: Fix near infinite loop in index reading due to missing eof check.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoj2kdec: Fix crash in get_qcx
Michael Niedermayer [Sat, 24 Dec 2011 05:17:12 +0000 (06:17 +0100)]
j2kdec: Fix crash in get_qcx

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoj2kdec: Check curtileno for validity
Michael Niedermayer [Sat, 24 Dec 2011 04:06:20 +0000 (05:06 +0100)]
j2kdec: Check curtileno for validity

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoj2kdec: Check for interger overflow in tile array allocation
Michael Niedermayer [Sat, 24 Dec 2011 04:03:04 +0000 (05:03 +0100)]
j2kdec: Check for interger overflow in tile array allocation

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoj2kdec: fix division by zero, check tile dimensions for validity
Michael Niedermayer [Sat, 24 Dec 2011 03:59:25 +0000 (04:59 +0100)]
j2kdec: fix division by zero, check tile dimensions for validity

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolzo: fix memcpy_backptr() with 0 offset
Michael Niedermayer [Sat, 24 Dec 2011 02:55:58 +0000 (03:55 +0100)]
lzo: fix memcpy_backptr() with 0 offset

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibopenjpeg: support decoding with bits per pixel greater than 8
Jean First [Thu, 22 Dec 2011 21:26:21 +0000 (22:26 +0100)]
libopenjpeg: support decoding with bits per pixel greater than 8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Approved-by: Alex Zhukov
(cherry picked from commit 0d4a77472ad8a4d194e93379a992f66c33fbf144)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavio: fix handling of , in urls
Michael Niedermayer [Fri, 23 Dec 2011 22:59:10 +0000 (23:59 +0100)]
avio: fix handling of , in urls
Fixes Ticket805

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRelease buffers after encoding svq1.
Carl Eugen Hoyos [Fri, 23 Dec 2011 10:39:41 +0000 (11:39 +0100)]
Release buffers after encoding svq1.

Fixes ticket #820.
(cherry picked from commit 8e88145d0b43a4572c1c13431c4f7ba644547c80)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix a possible endless loop when decoding aac.
Carl Eugen Hoyos [Fri, 23 Dec 2011 10:38:37 +0000 (11:38 +0100)]
Fix a possible endless loop when decoding aac.

Fixes ticket #789.
(cherry picked from commit e5de9289232c5b14572fa13e2435f9adb0b0f1ec)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: Fix a possible overread in decode_nal_units()
Alexander Strange [Mon, 12 Dec 2011 23:13:39 +0000 (18:13 -0500)]
h264: Fix a possible overread in decode_nal_units()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit bc6a3bd4a544608211f006e2d2868cbed4e1fde6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: Decode short VUI without error
Michael Niedermayer [Fri, 23 Dec 2011 04:58:32 +0000 (05:58 +0100)]
h264: Decode short VUI without error
Fixes 47j9R7PXBep.mov

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agow32thread: call ResetEvent() in pthread_cond_broadcast().
Sergey Radionov [Fri, 23 Dec 2011 03:37:48 +0000 (10:37 +0700)]
w32thread: call ResetEvent() in pthread_cond_broadcast().

Also add "volatile" to broadcast flag (since it is used from
multiple threads).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 01eb9805f37835e20501134ae26e379140fe3239)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoudp: support non blocking reads with fifo
Michael Niedermayer [Fri, 23 Dec 2011 00:51:47 +0000 (01:51 +0100)]
udp: support non blocking reads with fifo

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoudp: Replace double select() by select+mutex+cond.
Michael Niedermayer [Fri, 23 Dec 2011 00:17:18 +0000 (01:17 +0100)]
udp: Replace double select() by select+mutex+cond.

When no data was available both the buffer thread as well as
the main thread would block in select(), when data becomes
available both should move forward and as data is read in the
buffer thread the main thread would block in select() later
the read data was put in the fifo but the main thread still
would be blocked in select() until either the timeout or
another packet would come in.

This is solved in this commit by using a mutex and a condition
variable

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoudp: return circular buffer error if such error happened.
Michael Niedermayer [Fri, 23 Dec 2011 00:41:15 +0000 (01:41 +0100)]
udp: return circular buffer error if such error happened.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofifo: Make writes atomic.
Michael Niedermayer [Thu, 22 Dec 2011 23:18:36 +0000 (00:18 +0100)]
fifo: Make writes atomic.
Prior to this a X bytes write could be seen as less than X bytes being
available if the check was done at an unfortunate moment.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agokvmc: fix invalid reads
Gaurav Narula [Mon, 12 Dec 2011 14:54:54 +0000 (20:24 +0530)]
kvmc: fix invalid reads

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit ad3161ec1d70291efcf40121d703ef73c0b08e5b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadpcm: fix IMA SMJPEG decoding
Paul B Mahol [Wed, 21 Dec 2011 19:27:53 +0000 (19:27 +0000)]
adpcm: fix IMA SMJPEG decoding

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 01a01bf8bdafab1c81c3039850aba042b247626f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopthreads: reset active_thread_type when slice thread_init returrns early
Janne Grunau [Wed, 21 Dec 2011 12:07:54 +0000 (13:07 +0100)]
pthreads: reset active_thread_type when slice thread_init returrns early
(cherry picked from commit f77f640b3035d357a6c6ffcea243c7ea0d8ebc67)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agora144enc: zero the reflection coeffs if the filter is unstable
Justin Ruggles [Wed, 21 Dec 2011 21:09:11 +0000 (16:09 -0500)]
ra144enc: zero the reflection coeffs if the filter is unstable

fixes use of uninitialized values if the filter is still unstable after using
the previous frame lpc coefficients.
(cherry picked from commit 9a3f10695a011861dcf5a649e3e72580b1a4eed4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: Add SMJPEG demuxer.
Paul B Mahol [Mon, 19 Dec 2011 00:16:11 +0000 (00:16 +0000)]
lavf: Add SMJPEG demuxer.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a4209ad6313b8b40fed2bfc7e3865cf54d4c1022)

Conflicts:

Changelog
doc/general.texi
libavformat/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoipmovie: fix FPE
Michael Niedermayer [Wed, 21 Dec 2011 21:02:01 +0000 (22:02 +0100)]
ipmovie: fix FPE
Fixed Ticket807
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoproresdec: Check yuv slice data sizes.
Michael Niedermayer [Wed, 21 Dec 2011 20:06:05 +0000 (21:06 +0100)]
proresdec: Check yuv slice data sizes.
Fixes overread
Fixes Ticket812
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotruespeech: fix invalid reads in truespeech_apply_twopoint_filter()
Justin Ruggles [Wed, 21 Dec 2011 23:13:06 +0000 (18:13 -0500)]
truespeech: fix invalid reads in truespeech_apply_twopoint_filter()

fixes Bug 171
(cherry picked from commit f264d336fe61c12ce9607c3060aa5d3dca947c61)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibavcodec: Define a side data type for parameter changes
Martin Storsjö [Thu, 15 Dec 2011 16:30:03 +0000 (18:30 +0200)]
libavcodec: Define a side data type for parameter changes

Also define a codec capability for codecs that can handle
parameters changed externally between decoded packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit fe75dc8583b65612f3a94144ee090e741dc926d5)

Conflicts:

libavcodec/avcodec.h
libavcodec/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibavcodec: Define a side data type for new extradata
Martin Storsjö [Thu, 15 Dec 2011 14:11:49 +0000 (16:11 +0200)]
libavcodec: Define a side data type for new extradata

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 195c123cc87bb46efbadb48b2f756ae49bdb6774)

Conflicts:

libavcodec/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoc: add a list of errno codes on some systems.
Nicolas George [Wed, 21 Dec 2011 16:10:02 +0000 (17:10 +0100)]
doc: add a list of errno codes on some systems.
(cherry picked from commit 1f797a5826fff7e487d91134fa4c58f54813a466)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompeg12dec: reset first_field with picture_structure changes.
Michael Niedermayer [Wed, 21 Dec 2011 17:19:06 +0000 (18:19 +0100)]
mpeg12dec: reset first_field with picture_structure changes.
Fixes Ticket809
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoconfigure: Show whether the safe bitstream reader is enabled
Martin Storsjö [Wed, 21 Dec 2011 13:32:39 +0000 (15:32 +0200)]
configure: Show whether the safe bitstream reader is enabled

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9c984b1bd726997ea48a1441a3a84ce97648706d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegaudiodec: disable unneeded and not working checked reader.
Michael Niedermayer [Tue, 3 Jan 2012 20:05:25 +0000 (21:05 +0100)]
mpegaudiodec: disable unneeded and not working checked reader.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompeg12: disable checked reader.
Michael Niedermayer [Sun, 18 Dec 2011 02:24:09 +0000 (03:24 +0100)]
mpeg12: disable checked reader.
overreads in mpeg12 are not possible

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompeg4: disable checked bitstream reader, overreads are not possible.
Michael Niedermayer [Sun, 18 Dec 2011 02:20:41 +0000 (03:20 +0100)]
mpeg4: disable checked bitstream reader, overreads are not possible.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh263: disable slow checked reader, overreads are not possible in
Michael Niedermayer [Sun, 18 Dec 2011 02:19:40 +0000 (03:19 +0100)]
h263: disable slow checked reader, overreads are not possible in
ffmpegs h263 decoder

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: disable checking reader, overreads are not possible
Michael Niedermayer [Sun, 18 Dec 2011 02:17:44 +0000 (03:17 +0100)]
h264: disable checking reader, overreads are not possible
in ffmpegs h264 decoder.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoproresdec2: fix for removed a32 reader
Michael Niedermayer [Tue, 3 Jan 2012 20:01:08 +0000 (21:01 +0100)]
proresdec2: fix for removed a32 reader

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