24118 Commits

Author SHA1 Message Date
Kostya Shishkov
f79f3a946f 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>
(cherry picked from commit 0b9b3570a3e3f3eff088ee061dbab165ff3eff2f)

Conflicts:

	libavformat/smacker.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:33 +01:00
Laurent Aimar
5394cdf775 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:33 +01:00
Alex Converse
7f163e5a87 indeo2: fail if input buffer too small
(cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:33 +01:00
Alex Converse
23999c45bc indeo2: init_get_bits size in bits instead of bytes
(cherry picked from commit 68ca330cbd479111db9cb7649d7530ad59f04cc8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:33 +01:00
Alex Converse
14fae6eab0 wavpack: Check error codes rather than working around error conditions.
(cherry picked from commit dba2b63a98bdcac7bda1a8a2c48950518c075e17)

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

Conflicts:

	libavcodec/wavpack.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:33 +01:00
Laurent Aimar
f5a8c4242e 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>
(cherry picked from commit 685940da4c843beb9283a21718cbd2fa4fa5d796)

Conflicts:

	libavcodec/wavpack.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Laurent Aimar
1edc513bcf 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>
(cherry picked from commit 4b84e995ad88f3bfa533c38218f2791c14fd72f0)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Laurent Aimar
9864518544 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Sean McGovern
4ccb8f5b7b 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Jeff Downs
01b9a6e447 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Jeff Downs
34d2fe6860 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Kostya Shishkov
e7746f834a 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Luca Barbato
973bdafe05 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>
(cherry picked from commit fe3e7297fe56a383baca484dea2c0d603ae305f8)

Conflicts:

	libavformat/flvenc.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Reimar Döffinger
f4a5a730d8 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-12-24 12:20:32 +01:00
Dustin Brody
36c196bca4 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>
(cherry picked from commit 59a22afa0b50b9037133a7bc26bdc5023e7e1df9)

Conflicts:

	libavcodec/h264.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Baptiste Coudurier
7b733e4b7f 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Alex Converse
e07086d8ae 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Diego Biurrun
d2411412f1 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Rafaël Carré
0facc63ff6 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Mans Rullgard
5ed9457260 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Jindrich Makovicka
002e6d185c 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>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Justin Ruggles
81d5ceff04 alsa: fallback to buffer_size/4 for period_size.
buffer_size/4 is the value used by aplay. This fixes output to null
devices, e.g. writing ALSA output to a file.
(cherry picked from commit 8bfd7f6a475225a0595bf657f8b99a8fffb461e4)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Clément Bœsch
86849f0976 mxfenc: fix ignored drop flag in binary timecode representation.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 4d5e7ab5c48451404038706ef3113c9925a83087)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
John Stebbins
84fce203bd dca: set AVCodecContext frame_size for DTS audio
Set the frame size when decoding DTS audio.

This has the side effect of fixing the computation of timestamps for DTS-HD in compute_pkt_fields.  Since frame_size is
not currently set, the duration of a frame is being guessed based on the streams bitrate.  But for DTS-HD, the bitrate
currently used is the rate of the DTS core which is much different than the whole DTS-HD stream and leads to a wildly
inaccurate frame duration estimate.

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

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Jason Garrett-Glaser
572e94bc51 H.264: fix overreads of qscale_table
filter_mb_fast assumed that qscale_table was padded like many of the other tables.
(cherry picked from commit 5029a406334ad0eaf92130e23d596e405a8a5aa0)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:32 +01:00
Piotr Kaczuba
7487d53d01 postprocess.c: filter name needs to be double 0 terminated
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit f4f3300c09bb13eb7922e60888b55e3e0fb325e7)
(cherry picked from commit 20ca827019a72bfacb38e73d0b8590e651818272)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:31 +01:00
Alex Converse
21ad6e08e4 Replace strncpy() with av_strlcpy() in libpostproc.
(cherry picked from commit 1a5e4fd8c5b99478b4e08a69261930bb12aa948b)

Conflicts:

	ffmpeg.c
	libavcodec/ac3enc.c
	libavcodec/ass.c
	libavformat/movenc.c
	libavformat/mp3enc.c
	libavutil/log.c
2011-11-05 13:18:31 +01:00
Michael Niedermayer
feca20021c jpegdec: actually search for and parse RSTn
Fixes decoding of MJPEG files produced by some UVC Logitec web cameras,
such as "Notebook Pro" and "HD C910".

References:
http://trac.videolan.org/vlc/ticket/4215
http://ffmpeg.org/trac/ffmpeg/ticket/267

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Reviewed-by: Kostya <kostya.shishkov@gmail.com>
(cherry picked from commit 8c0fa61a9713a1306fca7997dd04d72ea1f060ea)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:31 +01:00
Alex Converse
394c3e78d5 riff: Add mpgv MPEG-2 fourcc
Supported by mplayer and seen in the wild.
(cherry picked from commit 505345ed5d180093a44da8d70ac541898c31c22f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:31 +01:00
Tomas Härdin
2fc39af1de Added M701 codec_tag for mpeg2video
Originally committed as revision 23513 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit 77d3f1f792c2a0bd455c75b0aa8e356b3a470ea7)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 13:18:31 +01:00
Reinhard Tartler
973d752dfb update version 2011-11-05 13:01:01 +01:00
Reinhard Tartler
3cc3f351a6 Release notes and changelog for 0.6.3 2011-11-05 12:46:18 +01:00
Michael Niedermayer
222d18ab20 Fix memory (re)allocation in matroskadec.c, related to MSVR-11-0080.
Whitespace of the patch cleaned up by Aurel
Some of the issues have been reported by Steve Manzuik / Microsoft Vulnerability Research (MSVR)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

(cherry picked from commit 956c901c68eff78288f40e3c8f41ee2fa081d4a8)

Further suggestions from Kostya <kostya.shishkov@gmail.com> have been
implemented by Reinhard Tartler <siretart@tauware.de>

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 77d2ef13a8fa630e5081f14bde3fd20f84c90aec)

NB: MSVR-11-0080 doesn't seem to exist. This issue seems to be known
as MSVR11-011 instead.

Fixes: CVE-2011-3504

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 12:31:43 +01:00
Mans Rullgard
7a6bba627d cavs: fix some crashes with invalid bitstreams
This removes all valgrind-reported invalid writes with one
specific test file.

Fixes http://www.ocert.org/advisories/ocert-2011-002.html

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

Fixes CVE-2011-3362, CVE-2011-3973, CVE-2011-3974

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 12:29:37 +01:00
Reinhard Tartler
9f95d7aab3 libvo-aacenc: Sync up with 0.7.2
This version was checked out from the 0.7.2 release and has some bits
reverted to compile in the release/0.6 branch

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 12:27:42 +01:00
Mans Rullgard
fe4a355805 Fix MMX rgb24 to yuv conversion with gcc 4.6
When built with gcc 4.6, the MMX rgb24 to yuv conversion gives
wrong output.  The compiler produces this warning:

libswscale/swscale_template.c:1885:5: warning: use of memory input without lvalue in asm operand 4 is deprecated

Changing the memory operand to a register makes it work.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-05 08:59:14 +01:00
Chris Evans
88ea7ca627 oggdec: prevent heap corruption.
Specifically crafted samples can reinit ogg->streams[] while
reading samples, and thus we should not cache old pointers since
these may no longer be valid.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry-picked from commit 4cc3467e7abfea7e8d03b6af511f7719038a5a98)
2011-08-04 22:01:25 +02:00
Reinhard Tartler
03ef9828b5 Fix ff_imdct_calc_sse() on gcc-4.6
Gcc 4.6 only preserves the first value when using an array with an "m"
constraint.

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

References:
http://bugs.debian.org/635324

Conflicts:

	libavcodec/x86/fft_sse.c
2011-07-25 09:38:48 +02:00
Reinhard Tartler
2ad6e14457 backport libvo-aacenc wrapper for aac encoding 2011-05-13 12:43:40 +02:00
Reinhard Tartler
f5d14a92cb Release notes for 0.6.3 2011-04-30 09:01:09 +02:00
Reinhard Tartler
b5c3b18bfc update Changelog 2011-04-30 08:44:07 +02:00
Michael Niedermayer
8539ea3265 AMV: disable DR1 and don't override EMU_EDGE
This works around a possibly exploitable crash.
Appearently, vlc can be exploited with a malicous file. This should get
reverted as soon as a proper fix is found.

Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
Reported-by: Dominic Chell <Dominic.Chell@ngssecure.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 89f903b3d5ec38c9c5d90fba7e626fa0eda61a32)
(cherry picked from commit 9b919571e506fbb72b81a35ca1e7c1bd6efc4209)
(cherry picked from commit 7089265756a84bf884a7c2290c6cda38d4dfd60f)

Signed-off-by: Reinhard Tartler <siretart@sandy.tauware.de>
2011-04-30 08:19:29 +02:00
Reinhard Tartler
9848e1be2d lavf: inspect more frames for fps when container time base is coarse
As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
millisecond precision.

Fix that by doubling the amount of timestamps inspected for frame rate
for streams that have coarse time base. This also fixes 29.970 detection
in matroska.

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

Tested with mplayer based on this report
http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 7c152a458d3fb0a2fb1aef1f05bfee90fe70697e)
2011-04-30 08:18:32 +02:00
Reinhard Tartler
66ebf37c73 Fix races in default av_log handler
Prevent competing threads from overwriting (shared) buffers.

Original patch by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0247bdee2581a6857a24c5ff297f01d3a3112b11)
2011-04-30 08:16:18 +02:00
Michael Niedermayer
036fefebb9 aac: add headers needed for log2f()
Allows compilation of aaccoder.c under cygwin

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>

(cherry picked from commit 30fe9719344f01a147628e07a8e79a9ccc7e0835)
2011-04-30 08:16:07 +02:00
Michael Niedermayer
1916656641 mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rbultje@google.com>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>

(cherry picked from commit 0d9cba562b88899f0769e686d19b7953f589069b)
2011-04-30 08:12:10 +02:00
Michael Kostylev
b4eafa8b04 Support writing 2d float arrays.
Patch by Michael Kostylev, michael D kostylev A gmail

Originally committed as revision 23105 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit 56b37cd1c7f3b5e5a3ece043c7ffccf70874cfb1)

Unbreaks compilation since the HE-AAC v2 backport
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-22 21:15:20 +01:00
Reinhard Tartler
2b2856bac2 Add missing dependencies for the AAC-HE backport for hardcoded tables
Unbreaks compilation with --enable-hardcoded-tables
2011-03-22 21:08:48 +01:00
Martin Storsjö
52f9b632b5 configure: Add the -D parameter to the dlltool command
This is required for the generated .lib file to actually
be usable by MSVC.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-22 12:42:56 +01:00
Luca Barbato
79e0cbae33 Set the correct target for mingw64 dlltool
That fixes .lib creation for the win64 target.
(cherry picked from commit 417516f63f8a9ee214ee9fa6fcb483962ea0f096)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-22 12:42:55 +01:00