29203 Commits

Author SHA1 Message Date
Laurent Aimar
bb6702f206 rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:40:34 +02:00
David Goldwich
dd606be909 lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 63d64228a7f31d534e3bcae87cbd37f4a0ae2dd6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:57 +02:00
Laurent Aimar
8c987d8291 oggdec: fix out of bound write in the ogg demuxer
Between ogg_save() and ogg_restore() calls, the number of streams
could have been reduced.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:50 +02:00
Laurent Aimar
6ddb12b688 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
(cherry picked from commit b59efc94347ccf0cbc2ff14a5a9e99819c5bdc4d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:31 +02:00
Michael Niedermayer
c34968c6d4 smacker: fix a few off by 1 errors
stereo & 16bit is untested due to lack of samples

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:20 +02:00
Laurent Aimar
a5107aab98 Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6489455495fc5bfbebcfe3f57e5d4fdd6a781091)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:14 +02:00
Laurent Aimar
bc2dd37e4f Check and propagate errors when VLC trees cannot be built in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9676ffba8346791f494451e68d2a3b37a2918a9b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:10 +02:00
Laurent Aimar
4482ee9d9c Fixed off by one packet size allocation in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit a92d0fa5d234582583d41b67dddecffc2c819573)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:50 +02:00
Laurent Aimar
2ac3aa129e Check for invalid packet size in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit e055932f5636a82275837968eea9c8fcb5bca474)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:45 +02:00
Laurent Aimar
1486e99b90 ape demuxer: fix segfault on memory allocation failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 273aab99bf7be2bcda95dd64101c2317ee0fcb99)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:41 +02:00
Alex Converse
dc6ee18363 xan: Add some buffer checks
(cherry picked from commit 0872bb23b4bd2d94a8ba91070f706d1bc1c3ced8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:35 +02:00
Laurent Aimar
bb0c352ec5 Fixed size given to init_get_bits() in xan decoder.
(cherry picked from commit 393d5031c6aaaf8c2dda4eb5d676974c349fae85)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:29 +02:00
Kostya Shishkov
1125f26f83 smacker demuxer: handle possible av_realloc() failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 47a8589f7bc69d1a29da1dfdfbd0dfa78a9e31fd)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:16 +02:00
Laurent Aimar
c11d360ebc Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 8bfea4ab4e2cb32bc7bf6f697ee30a238c65d296)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
dd6334a1e4 cljr: init_get_bits size in bits instead of bytes
(cherry picked from commit 0c1f5b93d9b97c4cc3684ba91a040e90bfc760d2)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
6b1af6a328 indeo2: fail if input buffer too small
(cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
1656dd7a4e indeo2: init_get_bits size in bits instead of bytes
(cherry picked from commit 68ca330cbd479111db9cb7649d7530ad59f04cc8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
144c80042b ffv1: Fixed size given to init_get_bits() in decoder.
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
(cherry picked from commit 46b004959bb7870a361a57272cd5fa7eea34250b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
a460d9e1f7 wavpack: Check error codes rather than working around error conditions.
(cherry picked from commit dba2b63a98bdcac7bda1a8a2c48950518c075e17)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
94af9cf46b Fixed invalid access in wavpack decoder on corrupted bitstream.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 55354b7de21e7bb4bbeb1c12ff55ea17f807c70c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
46d9dd6980 Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 0aedab03405849962b469277afe047aa2c61a87f)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
a652bb2857 Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit beefafda639dd53fc59c21d8a7cf8334da9a1062)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Anton Khirnov
7850a9b384 lavc: fix type for thread_type option
It should be flags, not int.
(cherry picked from commit fb47997edb9d8ff16fc380d005a08c0545624aa6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Anton Khirnov
de33e8675c AVOptions: fix av_set_string3() doxy to match reality.
Fixes bug 28.
(cherry picked from commit e955a682e125d44143415ff2b96a99a4dac78da2)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Sean McGovern
fe9dae6df8 cpu detection: avoid a signed overflow
1<<31 overflows because 1 is signed, so force it to unsigned.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Michael Niedermayer
a7d35b2f99 vf_scale: don't leak SWS context.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 52982dbe474663709033e1ad259f8ff7a5a2eefa)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alberto Delmás
526f24e3fd VC1: Fix first/last row checks with slices
In some places 0/mb_height were used in place of start_mb_y/end_mb_y.

Fixes SA00049, SA00058, SA10091, SA10097, SA10131, SA20021, SA30030

Improves PSNR in SA00054, SA00059, SA00060, SA10096, SA10098, SA20022,
SA30031, SA30032, SA40012, SA40013

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:04:32 +02:00
Ronald S. Bultje
a8edc1cbc7 vc1: properly zero coded_block[] edges on new slice entry.
Previously, we would leave the left edge uninitialized, which led to
CBP prediction errors on slice edges, e.g. in SA10098.vc1.
(cherry picked from commit d4b9974465baf893e90527a366e7a7411ded1ef8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:04:20 +02:00
Anton Khirnov
f45cfb4751 lavc: remove vbv_delay option
It's broken and serves no purpose as it's a read-only field.
(cherry picked from commit 8ee18b4bee24f99e733cf1425894e82c25d02426)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:03:38 +02:00
Jeff Downs
566d26923e h264: fix PCM intra-coded blocks in monochrome case
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 6581e161c5f46733a5619208483de29416eb9a51)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:03:01 +02:00
Jeff Downs
767efcb46e h264: correct implicit weight table computation for long ref pics
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 87cf70eb237e7586cc7399627dafa1b980ec0b7d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:02:55 +02:00
Jeff Downs
cb9ccc89c5 h264: correct the check for invalid long term frame index in MMCO decode
The current check on MMCO parameters prohibits a "max long term frame index
plus 1" of 16 (frame idx of 15) for the "set max long term frame index" MMCO.
Fix this off-by-one error to allow the full range of legal values.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 29a09eae9a827f4dbc9c4517180d8fe2ecef321a)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:02:49 +02:00
Alex Converse
5925e25218 aac: Only output configure if audio was found.
Audio found is not triggered on a CCE because a CCE alone has no output.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:02:23 +02:00
Kostya Shishkov
303e48e6a2 rv10/20: tell decoder to use edge emulation
This removes out-of-edge motion compensation artifacts (easily spotted green
blocks in avplay, gray blocks in transcoding), for example here:
http://samples.libav.org/samples/real/tv_watching_t1.rm

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 331971116d7d36743601bd2dc5384c5211d3bb48)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:01:32 +02:00
Luca Barbato
e30e0a16af flvenc: use int64_t to store offsets
Metadata currently is written only at the start of the file in normal
cases, when transcoding from a rtmp source metadata could be
written later and the offset recorded can exceed 32bit.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:00:45 +02:00
Reimar Döffinger
210d8f4ca2 VC-1: fix reading of custom PAR.
Custom PAR num/denum are in 1-256 range.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 0e8696551414d4ea0aab2559f9475d1fe49d08f3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:00:21 +02:00
Dustin Brody
cc4718196a h264: notice memory allocation failure
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit bac3ab13ea6a9dd8853e79ef3eacf51d234c8774)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:59:09 +02:00
Justin Ruggles
f629fcd308 Remove incorrect info in documentation of AVCodecContext.bits_per_raw_sample.
bits_per_raw_sample is used in video as well, where sample_fmt is not used.
(cherry picked from commit d271d5b2152cafe540f3ab71d3be6ce8636d2fd6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:58:39 +02:00
Baptiste Coudurier
b8fa424ce2 libx264: do not set pic quality if no frame is output
Avoids uninitialized reads.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:58:04 +02:00
Alex Converse
82d7ad3344 aac: Remove some suspicious illegal memcpy()s from LTP.
(cherry picked from commit a6c49f18abacb9bf52d4d808a2a56561a5b5445c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:53:16 +02:00
Alex Converse
c5388d680e mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
This prevents out of bounds reads when extradata is being decoded.
(cherry picked from commit 1f6f58d5855288492fc2640a9f1035c01c75d356)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:52:48 +02:00
Ronald S. Bultje
8abaa83d2c vp3/theora: flush after seek.
(cherry picked from commit 8dcf5184307f072d55fb29373be05ef8b0fd02df)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:51:55 +02:00
Diego Biurrun
8e0a53bd34 rv30: return AVERROR(EINVAL) instead of EINVAL
On some platforms EINVAL could be positive, ensure we return negative values.
(cherry picked from commit e5985185d2eda942333ebbb72bd7d043ffe40be7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:50:17 +02:00
Mans Rullgard
ba19cb6885 Fix incorrect max_lowres values
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e23a05ab0605693aa715b95120bc0132079ded06)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:48:27 +02:00
Rafaël Carré
3b80fb50d8 Do not decode RV30 files if the extradata is too small
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 289c60001fb0a9a1d7a97c876d8a42b84c6874ac)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:46:55 +02:00
Mans Rullgard
fe7deb7cc4 aacps: skip some memcpy() if src and dst would be equal
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e5902d60ce8f7cf10b6e87a57eec536b316261a3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:46:11 +02:00
Anton Khirnov
44b3f05309 lavf: fix segfault in av_open_input_stream()
ic is NULL in case of error.
(cherry picked from commit 13551ad1e336573e3732fdeaf25607c47244bb80)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:34:05 +02:00
Oskar Arvidsson
dc3ab8ca43 pix_fmt: Fix number of bits per component in yuv444p9be
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e59d6b4d7255d6d3dc89580f534e18af1433fe25)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:33:25 +02:00
Jindrich Makovicka
e308a91c9c mpegts: fix Continuity Counter error detection
According to MPEG-TS specs, the continuity_counter shall not be
incremented when the adaptation_field_control of the packet
equals '00' or '10'.

Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8923cfa328e8eb565aebcfe8672b276fd1c19bf7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:32:56 +02:00
Justin Ruggles
207db36a4f alsa: limit buffer_size to 32768 frames.
In testing, the file output plugin gave a max buffer size of about 20 million
frames, which is way more than what is really needed and causes a memory
allocation error on my system.
(cherry picked from commit e35c674d13a7f180412cfe058530a2e7f1d49a90)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:31:40 +02:00