36012 Commits

Author SHA1 Message Date
Alexander Strange
3aa89662ce 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>
2012-01-03 22:27:36 +01:00
Michael Niedermayer
ed0dc01a47 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>
2012-01-03 22:27:02 +01:00
Sergey Radionov
4a4e4b8139 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>
2012-01-03 22:26:47 +01:00
Michael Niedermayer
33636442e2 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>
2012-01-03 22:26:26 +01:00
Michael Niedermayer
3710f0b9ed 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>
2012-01-03 22:26:20 +01:00
Michael Niedermayer
12d0e44bdb 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>
2012-01-03 22:26:06 +01:00
Michael Niedermayer
857d64a58c 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>
2012-01-03 22:25:53 +01:00
Gaurav Narula
a644934b80 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>
2012-01-03 22:25:47 +01:00
Paul B Mahol
89cf156ace 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>
2012-01-03 22:25:03 +01:00
Janne Grunau
4f94de84e8 pthreads: reset active_thread_type when slice thread_init returrns early
(cherry picked from commit f77f640b3035d357a6c6ffcea243c7ea0d8ebc67)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:24:57 +01:00
Justin Ruggles
9665ccda10 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>
2012-01-03 21:51:53 +01:00
Paul B Mahol
8dce2dd9cc 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>
2012-01-03 21:51:53 +01:00
Michael Niedermayer
532731369a 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>
2012-01-03 21:51:53 +01:00
Michael Niedermayer
1c930fe915 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>
2012-01-03 21:51:53 +01:00
Justin Ruggles
a25c7081ab 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>
2012-01-03 21:51:53 +01:00
Martin Storsjö
dfdb3ca341 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>
2012-01-03 21:51:53 +01:00
Martin Storsjö
c21440637e 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>
2012-01-03 21:51:52 +01:00
Nicolas George
0620b6636e doc: add a list of errno codes on some systems.
(cherry picked from commit 1f797a5826fff7e487d91134fa4c58f54813a466)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 21:51:52 +01:00
Michael Niedermayer
f45a5c60b9 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>
2012-01-03 21:51:52 +01:00
Martin Storsjö
6ba87ba6f9 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>
2012-01-03 21:51:52 +01:00
Michael Niedermayer
22721b2829 mpegaudiodec: disable unneeded and not working checked reader.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 21:51:52 +01:00
Michael Niedermayer
9bd47bbcc6 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>
2012-01-03 21:51:52 +01:00
Michael Niedermayer
42b69286de 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>
2012-01-03 21:51:52 +01:00
Michael Niedermayer
e8928f7e97 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>
2012-01-03 21:51:52 +01:00
Michael Niedermayer
b1933a1e12 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>
2012-01-03 21:51:44 +01:00
Michael Niedermayer
36e30d7ab9 proresdec2: fix for removed a32 reader
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 21:01:08 +01:00
Ronald S. Bultje
ea199c707c 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>
2012-01-03 20:59:17 +01:00
Mans Rullgard
09ce851c7e 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>
2012-01-03 20:58:22 +01:00
Tomas Härdin
5c2097cff7 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>
2012-01-03 20:52:21 +01:00
Tomas Härdin
6a8826abf4 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>
2012-01-03 20:51:52 +01:00
Tomas Härdin
46e4dd66da 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>
2012-01-03 20:50:30 +01:00
Tomas Härdin
7e35c3e177 mxfdec: Check for NULL component
This fixes SIGSEGV with zzuf1.mxf
(cherry picked from commit 5e5e69d0787ae4939f3f8e8d6c0342310eda28ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 20:50:20 +01:00
Sergey Radionov
0f38b11939 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>
2012-01-03 20:49:52 +01:00
Michael Niedermayer
fd552756d9 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>
2012-01-03 20:49:24 +01:00
Luca Barbato
8056d020ad 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>
2012-01-03 20:48:48 +01:00
Michael Niedermayer
d20e948f07 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>
2012-01-03 20:01:50 +01:00
Michael Niedermayer
acbdee0a2b 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>
2012-01-03 20:01:45 +01:00
Rafaël Carré
fa86884dbc 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>
2012-01-03 20:01:13 +01:00
Luca Barbato
3d207417fb 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>
2012-01-03 20:00:13 +01:00
Luca Barbato
cb75ed3014 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>
2012-01-03 20:00:05 +01:00
Michael Niedermayer
41ff9350e9 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>
2012-01-03 19:59:33 +01:00
Michael Niedermayer
f8320fd344 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>
2012-01-03 19:59:26 +01:00
Aneesh Dogra
ae26aab2c3 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>
2012-01-03 19:58:41 +01:00
Alex Converse
7a8fc9906f 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>
2012-01-03 19:58:16 +01:00
Alex Converse
c2507fb986 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>
2012-01-03 19:56:57 +01:00
Michael Niedermayer
1db39228c6 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>
2012-01-03 19:56:16 +01:00
Michael Niedermayer
d8d25f143f 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>
2012-01-03 19:56:06 +01:00
Michael Niedermayer
c550d56414 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>
2012-01-03 19:56:01 +01:00
Michael Niedermayer
d561025e49 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>
2012-01-03 19:55:54 +01:00
Stefano Sabatini
61fb7e17a2 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>
2012-01-03 19:55:10 +01:00