ffmpeg.git
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>
7 years agoget_bits: introduce safe bitreading to prevent overreads.
Ronald S. Bultje [Fri, 16 Dec 2011 21:42:04 +0000 (21:42 +0000)]
get_bits: introduce safe bitreading to prevent overreads.

When turned on, H264/CAVLC gets ~15% (CVPCMNL1_SVA_C.264) slower for
ultra-high-bitrate files, or ~2.5% (CVFI1_SVA_C.264) for lower-bitrate
files. Other codecs are affected to a lesser extent because they are
less optimized; e.g., VC-1 slows down by less than 1% (all on x86).
The patch generated 3 extra instructions (cmp, cmovae and mov) per
call to get_bits().

The performance penalty on ARM is within the error margin for most
files, up to 4% in extreme cases such as CVPCMNL1_SVA_C.264.

Based on work (for GCI) by Aneesh Dogra <lionaneesh@gmail.com>, and
inspired by patch in Chromium by Chris Evans <cevans@chromium.org>.
(cherry picked from commit 8cfbbd928cc94b4de6ad0a937cb818e999c7d75d)

Conflicts:

configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoget_bits: remove A32 variant
Mans Rullgard [Fri, 16 Dec 2011 21:19:50 +0000 (21:19 +0000)]
get_bits: remove A32 variant

The A32 bitstream reader variant is only used on ARMv5 and for
Prores due to the larger bit cache this decoder requires.

In benchmarks on ARMv5 (Marvell Sheeva) with gcc 4.6, the only
statistically significant difference between ALT and A32 is
a 4% advantage for ALT in FLAC decoding.  There is thus no (longer)
any reason to keep the A32 reader from this point of view.

This patch adds an option to the ALT reader increasing the bit
cache to 32 bits as required by the Prores decoder.  Benchmarking
shows no significant change in speed on Intel i7.  Again, the
A32 reader fails to justify its existence.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit a1e98f198e9db4e5ddfc2f777014179d3d7bc4d2)

Conflicts:

libavcodec/get_bits.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomxfdec: Sanity check PreviousPartition
Tomas Härdin [Wed, 21 Dec 2011 09:56:59 +0000 (10:56 +0100)]
mxfdec: Sanity check PreviousPartition

Without this certain files could get the demuxer stuck in a loop
(cherry picked from commit 46d65fb8a574465499a470d0c34a30902e45176a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomxfdec: Move the current_partition check inside mxf_read_header()
Tomas Härdin [Tue, 20 Dec 2011 17:11:10 +0000 (18:11 +0100)]
mxfdec: Move the current_partition check inside mxf_read_header()

This fixes SIGSEGV on files where this is actually the case, such as zzuf4.mxf
(cherry picked from commit 184f479096dabcb1eafd9c661304f410a76780ed)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomxfdec: Check url_feof() in mxf_read_local_tags()
Tomas Härdin [Tue, 20 Dec 2011 16:39:59 +0000 (17:39 +0100)]
mxfdec: Check url_feof() in mxf_read_local_tags()

This fixes the infinite loop with zzuf2.mxf
(cherry picked from commit 2116e4ba917748c0985be2347d400ba0f3fe6c64)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomxfdec: Check for NULL component
Tomas Härdin [Tue, 20 Dec 2011 16:38:27 +0000 (17:38 +0100)]
mxfdec: Check for NULL component

This fixes SIGSEGV with zzuf1.mxf
(cherry picked from commit 5e5e69d0787ae4939f3f8e8d6c0342310eda28ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agow32threads: wait for the waked thread in pthread_cond_signal.
Sergey Radionov [Wed, 21 Dec 2011 02:08:56 +0000 (09:08 +0700)]
w32threads: wait for the waked thread in pthread_cond_signal.

This fixes a deadlock VLC triggered with multithreaded decoding. The
wait forces one of the current waiters to wake and not the thread
which calls pthread_cond_signal() itself.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavio: remove ENOTSUP mention in doxy as its not available on all supported platforms
Michael Niedermayer [Wed, 21 Dec 2011 03:52:34 +0000 (04:52 +0100)]
avio: remove ENOTSUP mention in doxy as its not available on all supported platforms
and thus cannot be used

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: account for NUT 10bit support
Luca Barbato [Wed, 21 Dec 2011 01:50:57 +0000 (02:50 +0100)]
fate: account for NUT 10bit support

Some libavifilter tests use NUT as output even if the produced
files were not decodable. The support for 10bit introduced in
432f0e5b7d and 91b1e6f0c changed the hashes.
(cherry picked from commit 9f3c77dd2a4fa4accf102c2af1f22567652b8e0f)

Conflicts:

tests/ref/lavfi/pixdesc
tests/ref/lavfi/pixfmts_copy
tests/ref/lavfi/pixfmts_null
tests/ref/lavfi/pixfmts_scale
tests/ref/lavfi/pixfmts_vflip

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoindeo3: Fix null ptr dereference
Michael Niedermayer [Tue, 20 Dec 2011 23:35:10 +0000 (00:35 +0100)]
indeo3: Fix null ptr dereference
Fixes Ticket804
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agogolomb: fix end of bitstream check
Michael Niedermayer [Tue, 20 Dec 2011 23:28:39 +0000 (00:28 +0100)]
golomb: fix end of bitstream check
Fixes Ticket806
Bug found by Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc: always align height by 32 pixel
Rafaël Carré [Tue, 13 Dec 2011 14:32:34 +0000 (15:32 +0100)]
lavc: always align height by 32 pixel

Interlaced content for most codec requires it.
This patch is a stop-gap pending a serious rework to support
codecs with non 16 pixel macroblocks.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 37c0dc626d2f8254ef623d987eb5077f9120755f)

Conflicts:

libavcodec/utils.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoraw: add 10bit YUV definitions
Luca Barbato [Sun, 4 Dec 2011 14:56:40 +0000 (15:56 +0100)]
raw: add 10bit YUV definitions

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 91b1e6f0c678e5d096185c2011f4ca56a3290a20)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agonut: support 10bit YUV
Luca Barbato [Sun, 4 Dec 2011 14:56:39 +0000 (15:56 +0100)]
nut: support 10bit YUV

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 432f0e5b7d2329976ef7aee05d990c7462efd0ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoindeo5: Fix null pointer dereference
Michael Niedermayer [Tue, 20 Dec 2011 21:06:35 +0000 (22:06 +0100)]
indeo5: Fix null pointer dereference
Fixes Ticket803
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoff*: Fix duplicatedly printed version info with -version
Michael Niedermayer [Tue, 20 Dec 2011 21:03:25 +0000 (22:03 +0100)]
ff*: Fix duplicatedly printed version info with -version

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobytestream: add a new set of bytestream functions with overread checking
Aneesh Dogra [Mon, 19 Dec 2011 22:24:50 +0000 (03:54 +0530)]
bytestream: add a new set of bytestream functions with overread checking

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegts: Suppress invalid timebase warnings on DMB streams.
Alex Converse [Mon, 19 Dec 2011 18:48:57 +0000 (10:48 -0800)]
mpegts: Suppress invalid timebase warnings on DMB streams.

timestamp_len and timestamp_res intialize to zero.
(cherry picked from commit 41bdd4adc4ab90a5ef7d63050a4046fcba711365)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegts: Fix typo in handling sections in the PMT.
Alex Converse [Mon, 19 Dec 2011 18:41:22 +0000 (10:41 -0800)]
mpegts: Fix typo in handling sections in the PMT.

This was an error rebasing 4682a1dc3aa2554ad7077f5db32d0f2d598d018e for
commit. The "pes" variable guaranteed to be NULL in that block.
(cherry picked from commit d9b89b23df4f63d67694507f3d1caee62424a9d8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoroq: fix excessive memory alloc
Michael Niedermayer [Tue, 20 Dec 2011 17:00:30 +0000 (18:00 +0100)]
roq: fix excessive memory alloc
Fixes Ticket802
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoalac: Check for bitstream overread
Michael Niedermayer [Tue, 20 Dec 2011 16:51:53 +0000 (17:51 +0100)]
alac: Check for bitstream overread
Fixes Ticket801
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotm2: Check remaining size before init_get_bits()
Michael Niedermayer [Tue, 20 Dec 2011 15:53:56 +0000 (16:53 +0100)]
tm2: Check remaining size before init_get_bits()
Fixes a null pointer dereference.
Fixes 2nd half of Ticket800
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavidec: move eof check before continue.
Michael Niedermayer [Tue, 20 Dec 2011 15:52:42 +0000 (16:52 +0100)]
avidec: move eof check before continue.
Fixes a infinite loop
Fixes half of Ticket800
Bug found by Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavd/lavfi: add check in case pix_fmts cannot be allocated in lavfi_read_header()
Stefano Sabatini [Tue, 20 Dec 2011 12:17:03 +0000 (13:17 +0100)]
lavd/lavfi: add check in case pix_fmts cannot be allocated in lavfi_read_header()
(cherry picked from commit 4d475f7eb3969a378f1c2722118c57b62d2ac461)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoswr: fix assert failure
Michael Niedermayer [Tue, 20 Dec 2011 10:23:46 +0000 (11:23 +0100)]
swr: fix assert failure
Bug found by: Oana Stratulat
GCI-id: 7211207

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosiff: simplify code by using ffio_limit()
Michael Niedermayer [Mon, 19 Dec 2011 18:23:56 +0000 (19:23 +0100)]
siff: simplify code by using ffio_limit()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoxl: Fix overreads
Aneesh Dogra [Mon, 19 Dec 2011 18:30:30 +0000 (00:00 +0530)]
xl: Fix overreads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosoxdec: check av_malloc return.
Michael Niedermayer [Mon, 19 Dec 2011 18:11:49 +0000 (19:11 +0100)]
soxdec: check av_malloc return.
Bug found by: durandal_1707

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoeamad: pass & check errors
Michael Niedermayer [Mon, 19 Dec 2011 15:30:30 +0000 (16:30 +0100)]
eamad: pass & check errors

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoeamad: fix excessive memory allocation.
Michael Niedermayer [Mon, 19 Dec 2011 15:27:52 +0000 (16:27 +0100)]
eamad: fix excessive memory allocation.
Fixes Ticket792
Bug found by Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoswscale: Fix several (real world) integer overflows.
Michael Niedermayer [Mon, 19 Dec 2011 14:48:47 +0000 (15:48 +0100)]
swscale: Fix several (real world) integer overflows.
Fixes Ticket795
Bug Found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodsicin demuxer: Fix excessive malloc()
Michael Niedermayer [Mon, 19 Dec 2011 10:47:15 +0000 (11:47 +0100)]
dsicin demuxer: Fix excessive malloc()
use ffio_limit()
Fixes Ticket 790
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: split out ffio_limit()
Michael Niedermayer [Mon, 19 Dec 2011 10:46:34 +0000 (11:46 +0100)]
lavf: split out ffio_limit()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotqi: Fix passing errors from the MB decode. This silences some valgrind warnings.
Michael Niedermayer [Mon, 19 Dec 2011 03:13:37 +0000 (04:13 +0100)]
tqi: Fix passing errors from the MB decode. This silences some valgrind warnings.
Fixes second half of Ticket794
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadpcm: Fix crash
Michael Niedermayer [Mon, 19 Dec 2011 03:09:23 +0000 (04:09 +0100)]
adpcm: Fix crash
Fixes half of Ticket794
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoproresdec: add UPDATE_CACHE, should fix decoding with -Os
Michael Niedermayer [Mon, 19 Dec 2011 02:43:53 +0000 (03:43 +0100)]
proresdec: add UPDATE_CACHE, should fix decoding with -Os

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorl2demux: Fix FPE
Michael Niedermayer [Sun, 18 Dec 2011 22:54:56 +0000 (23:54 +0100)]
rl2demux: Fix FPE
Fixes Ticket788
Bug found by Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocljr: fix buf_size sanity check
Paul B. Mahol [Sat, 17 Dec 2011 17:58:06 +0000 (17:58 +0000)]
cljr: fix buf_size sanity check

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosiff: Fix excessive memory allocation.
Michael Niedermayer [Sun, 18 Dec 2011 21:43:19 +0000 (22:43 +0100)]
siff: Fix excessive memory allocation.
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomov: detect EOF in mov_read_dref()
Michael Niedermayer [Sun, 18 Dec 2011 20:37:54 +0000 (21:37 +0100)]
mov: detect EOF in mov_read_dref()
This fixes a (near) infinite loop and Ticket783
Bug found by: cosminamironesei

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadx_parser: rewrite.
Michael Niedermayer [Sun, 18 Dec 2011 19:12:16 +0000 (20:12 +0100)]
adx_parser: rewrite.
The previous code ended in multiple different infinite
loops. See stl_ten_1_big.sfd as example with and without zzuf

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadxdec: Fix division by zero
Michael Niedermayer [Sun, 18 Dec 2011 19:10:51 +0000 (20:10 +0100)]
adxdec: Fix division by zero

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadxdec: Do not require extradata.
Michael Niedermayer [Sun, 18 Dec 2011 19:10:30 +0000 (20:10 +0100)]
adxdec: Do not require extradata.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadx_parser: Fix infinite loop.
Michael Niedermayer [Sun, 18 Dec 2011 17:57:56 +0000 (18:57 +0100)]
adx_parser: Fix infinite loop.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAssume architecture arm for machine hardware name iPad*.
Carl Eugen Hoyos [Sun, 18 Dec 2011 12:48:44 +0000 (13:48 +0100)]
Assume architecture arm for machine hardware name iPad*.

uname -m returns for example "iPad2,1".
(cherry picked from commit b6b00675112b411fbb10e8b01be1d3ddc2574cf9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix possible endless loop when decoding amr.
Carl Eugen Hoyos [Sun, 18 Dec 2011 13:20:14 +0000 (14:20 +0100)]
Fix possible endless loop when decoding amr.

Fixes bug 151.

Reviewed-by: Vitor Sessak
(cherry picked from commit 290e7eb77bee5a54182fb3d5fb122c1e117190da)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomotion_est: avoid generating motion vectors that point between widthxheight and mb_wi...
Michael Niedermayer [Sat, 17 Dec 2011 18:55:47 +0000 (19:55 +0100)]
motion_est: avoid generating motion vectors that point between widthxheight and mb_widthxmb_height.
No difference in PSNR or bitrate in the printed precission with the matrix lobby scene at 322x242

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolagarith: rgb24 support
Michael Niedermayer [Sat, 17 Dec 2011 23:09:26 +0000 (00:09 +0100)]
lagarith: rgb24 support

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomsvideo1enc: Check that dimensions are a multiple of 4.
Michael Niedermayer [Sat, 17 Dec 2011 22:08:46 +0000 (23:08 +0100)]
msvideo1enc: Check that dimensions are a multiple of 4.
Fixes Ticket784
Found by: ami_stuff

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadpcm: Check for channels to be a non-zero integer
Shitiz Garg [Sat, 17 Dec 2011 14:05:59 +0000 (19:35 +0530)]
adpcm: Check for channels to be a non-zero integer

channels would be 0 sometimes and would cause floating point exception
Fixes bugzilla #124

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc: Check codec_ids against insertion/removial typos
Michael Niedermayer [Sat, 17 Dec 2011 05:09:13 +0000 (06:09 +0100)]
lavc: Check codec_ids against insertion/removial typos

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavutil: check sampleformats enum, pict type enum and media type enum against insert...
Michael Niedermayer [Sat, 17 Dec 2011 04:45:34 +0000 (05:45 +0100)]
avutil: check sampleformats enum, pict type enum and media type enum against insert/remove mistakes.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopixfmts: Selfcheck against insertions / deletions in the enum.
Michael Niedermayer [Sat, 17 Dec 2011 04:41:42 +0000 (05:41 +0100)]
pixfmts: Selfcheck against insertions / deletions in the enum.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoaacdec: Fix null pointer crash
Michael Niedermayer [Sat, 17 Dec 2011 04:02:11 +0000 (05:02 +0100)]
aacdec: Fix null pointer crash
Fixes bug170
Bug found by: Gautam Gupta

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

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