ffmpeg.git
7 years agoUpdate for 0.8.9 n0.8.9
Michael Niedermayer [Mon, 2 Jan 2012 19:20:14 +0000 (20:20 +0100)]
Update for 0.8.9

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp3: fix regression with mplayer-crash.ogv
Michael Niedermayer [Mon, 2 Jan 2012 14:27:43 +0000 (15:27 +0100)]
vp3: fix regression with mplayer-crash.ogv

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

7 years agoh264: fix init of topleft ref/mv.
Michael Niedermayer [Sat, 17 Dec 2011 03:42:04 +0000 (04:42 +0100)]
h264: fix init of topleft ref/mv.
Fixes Ticket778

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoUpdate for 0.8.8 n0.8.8
Michael Niedermayer [Sun, 25 Dec 2011 20:45:57 +0000 (21:45 +0100)]
Update for 0.8.8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/release/0.7' into release/0.8
Michael Niedermayer [Sun, 25 Dec 2011 18:25:27 +0000 (19:25 +0100)]
Merge remote-tracking branch 'qatar/release/0.7' into release/0.8

* qatar/release/0.7:
  Update Changelog for 0.7.3 release

Conflicts:
Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/release/0.7' into release/0.8
Michael Niedermayer [Sat, 24 Dec 2011 00:19:33 +0000 (01:19 +0100)]
Merge remote-tracking branch 'qatar/release/0.7' into release/0.8

This merge is primary for metadata, theres little actually changed
except cosmetics

* qatar/release/0.7:
  4xm: Add a check in decode_i_frame to prevent buffer overreads
  wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
  Update RELEASE file for 0.7.3
  swscale: #include "libavutil/mathematics.h"
  vp3dec: Check coefficient index in vp3_dequant()
  svq1dec: call avcodec_set_dimensions() after dimensions changed.
  swscale: Readd #define _SVID_SOURCE

Conflicts:
RELEASE
libavcodec/4xm.c
libavcodec/vp3.c
libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoUpdate Changelog for 0.7.3 release
Reinhard Tartler [Fri, 23 Dec 2011 21:40:24 +0000 (22:40 +0100)]
Update Changelog for 0.7.3 release

7 years ago4xm: Add a check in decode_i_frame to prevent buffer overreads
Shitiz Garg [Wed, 14 Dec 2011 12:59:21 +0000 (18:29 +0530)]
4xm: Add a check in decode_i_frame to prevent buffer overreads

Fixes bugzilla #135

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agowma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
Justin Ruggles [Tue, 22 Nov 2011 18:37:52 +0000 (13:37 -0500)]
wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.

The initial values are not checked against the number of block sizes.
Initializing them to frame_len_bits will result in a block size index of 0
in these cases instead of something that might be out-of-range.

Fixes Bug 81.
(cherry picked from commit 05d1e45d1f42cc90d1f2f36c546d0096cea126a8)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agoUpdate RELEASE file for 0.7.3
Reinhard Tartler [Fri, 23 Dec 2011 15:00:17 +0000 (16:00 +0100)]
Update RELEASE file for 0.7.3

7 years agoswscale: #include "libavutil/mathematics.h"
Reinhard Tartler [Thu, 1 Dec 2011 17:48:33 +0000 (18:48 +0100)]
swscale: #include "libavutil/mathematics.h"

this file uses the M_PI macro since
4e74187db2f5db52f88729efc662df9d6bc763e1, so include the correct header
directly.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovp3dec: Check coefficient index in vp3_dequant()
Reinhard Tartler [Sun, 4 Dec 2011 09:10:33 +0000 (10:10 +0100)]
vp3dec: Check coefficient index in vp3_dequant()

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Fixes NGS00145, CVE-2011-4352

Found-by: Phillip Langlois
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 8b94df0f2047e9728cb872adc9e64557b7a5152f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agosvq1dec: call avcodec_set_dimensions() after dimensions changed.
Michael Niedermayer [Fri, 18 Nov 2011 18:10:21 +0000 (19:10 +0100)]
svq1dec: call avcodec_set_dimensions() after dimensions changed.

Fixes NGS00148, CVE-2011-4579

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agompegtsenc: fix handling of large audio packets
Michael Niedermayer [Wed, 19 Oct 2011 20:57:36 +0000 (22:57 +0200)]
mpegtsenc: fix handling of large audio packets
(sorry i have no sample, just a user report)

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

Conflicts:

libavformat/mpegtsenc.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/release/0.7' into release/0.8
Michael Niedermayer [Thu, 8 Dec 2011 00:14:02 +0000 (01:14 +0100)]
Merge remote-tracking branch 'qatar/release/0.7' into release/0.8

Note, all these commits where already in our release, this merge thus
changes nothing, its just for metadata

* qatar/release/0.7:
  vp6: Fix illegal read.
  vp6: Fix illegal read.
  vp6: Reset the internal state when aborting key frames header parsing
  vp6: Check for huffman tree build errors
  vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
  imgutils: Fix illegal read.
  qdm2: check output buffer size before decoding
  Fix out of bound reads in the QDM2 decoder.
  Check for out of bound writes in the QDM2 decoder.
  vmd: fix segfaults on corruped streams

Conflicts:
libavcodec/qdm2.c
libavcodec/vmdav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: Use mismatching frame numbers in fields
Michael Niedermayer [Sat, 12 Nov 2011 20:10:15 +0000 (21:10 +0100)]
h264: Use mismatching frame numbers in fields

to synchronize the first/second field state independant of them being reference or not.
Fixes Ticket354

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

7 years agoswscale: Readd #define _SVID_SOURCE
Martin Storsjö [Thu, 24 Nov 2011 22:45:16 +0000 (00:45 +0200)]
swscale: Readd #define _SVID_SOURCE

This was removed erroneously in
046f081b46c8479820409cf8f530b988221bd15b. This define still is
necessary for getting MAP_ANONYMOUS defined on linux/glibc,
despite the define reshuffling done in that commit.

Without MAP_ANONYMOUS defined, the mprotect calls for setting the
generated mmx2 scaler code pages executable are left out, causing
crashes if that codepath is chosen.

This patch fixes scaling from 192x144 to 320x240 with
-sws_flags fast_bilinear, which crashes on linux at the
moment.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovp6: Fix illegal read.
Thierry Foucu [Thu, 17 Nov 2011 17:39:52 +0000 (09:39 -0800)]
vp6: Fix illegal read.

Found with Address Sanitizer

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovp6: Fix illegal read.
Alex Converse [Thu, 3 Nov 2011 22:55:52 +0000 (15:55 -0700)]
vp6: Fix illegal read.

(cherry picked from commit 2a6eb06254df79e96b3d791b6b89b2534ced3119)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovp6: Reset the internal state when aborting key frames header parsing
Laurent Aimar [Fri, 23 Sep 2011 20:36:11 +0000 (22:36 +0200)]
vp6: Reset the internal state when aborting key frames header parsing

It prevents leaving the state only half initialized.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovp6: Check for huffman tree build errors
Laurent Aimar [Wed, 21 Sep 2011 18:46:32 +0000 (20:46 +0200)]
vp6: Check for huffman tree build errors

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovp6: partially propagate huffman tree building errors during coeff model parsing...
Dustin Brody [Tue, 16 Aug 2011 20:46:34 +0000 (16:46 -0400)]
vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agoimgutils: Fix illegal read.
Thierry Foucu [Sat, 19 Nov 2011 01:36:50 +0000 (17:36 -0800)]
imgutils: Fix illegal read.

Found with address sanitizer.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agoqdm2: check output buffer size before decoding
Justin Ruggles [Wed, 14 Sep 2011 17:57:04 +0000 (13:57 -0400)]
qdm2: check output buffer size before decoding

(cherry picked from commit 7d49f79f1cd47783a963a757a6563b9cac29db62)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agoFix out of bound reads in the QDM2 decoder.
Laurent Aimar [Fri, 30 Sep 2011 22:45:04 +0000 (00:45 +0200)]
Fix out of bound reads in the QDM2 decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 5a19acb17ceb71657b0eec51dac651953520e5c8)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agoCheck for out of bound writes in the QDM2 decoder.
Laurent Aimar [Fri, 30 Sep 2011 22:45:05 +0000 (00:45 +0200)]
Check for out of bound writes in the QDM2 decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 291d74a46d32183653db07818c7b3407fd50a288)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovmd: fix segfaults on corruped streams
Laurent Aimar [Sun, 11 Sep 2011 17:17:45 +0000 (19:17 +0200)]
vmd: fix segfaults on corruped streams

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agoFix adts format creation in aac+ encoder modified: libavcodec/libaacplus.c
Sergiy Gur'yev [Thu, 24 Nov 2011 12:53:19 +0000 (14:53 +0200)]
Fix adts format creation in aac+ encoder modified: libavcodec/libaacplus.c

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

7 years agoUpdate for 0.8.7 n0.8.7
Michael Niedermayer [Mon, 21 Nov 2011 19:00:52 +0000 (20:00 +0100)]
Update for 0.8.7

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosvq1dec: call avcodec_set_dimensions() after dimensions changed.
Michael Niedermayer [Fri, 18 Nov 2011 18:10:21 +0000 (19:10 +0100)]
svq1dec: call avcodec_set_dimensions() after dimensions changed.
Fixes NGS00148

Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4931c8f0f10bf8dedcf626104a6b85bfefadc6f2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp3dec: Check coefficient index in vp3_dequant()
Michael Niedermayer [Fri, 18 Nov 2011 17:08:31 +0000 (18:08 +0100)]
vp3dec: Check coefficient index in vp3_dequant()
Fixes NGS00145

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoqdm2dec: fix buffer overflow.
Michael Niedermayer [Fri, 18 Nov 2011 16:48:31 +0000 (17:48 +0100)]
qdm2dec: fix buffer overflow.
Fixes NGS00144

This also adds a few lines of code from master that are needed for this fix.

Thanks to Phillip for suggestions to improve the patch.
Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: Fix invalid interlaced progressive MB combinations for direct mode prediction.
Michael Niedermayer [Mon, 21 Nov 2011 01:03:13 +0000 (02:03 +0100)]
h264: Fix invalid interlaced progressive MB combinations for direct mode prediction.
Fixes Ticket312

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegvideo: dont use ff_mspel_motion() for vc1
Michael Niedermayer [Sun, 20 Nov 2011 16:19:25 +0000 (17:19 +0100)]
mpegvideo: dont use ff_mspel_motion() for vc1
Fixes Ticket655

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoimgutils: Fix illegal read.
Thierry Foucu [Sat, 19 Nov 2011 01:36:50 +0000 (17:36 -0800)]
imgutils: Fix illegal read.

Found with address sanitizer.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoac3probe: Detect Sonic Foundry Soft Encode AC3 as raw AC3.
Michael Niedermayer [Thu, 17 Nov 2011 18:38:47 +0000 (19:38 +0100)]
ac3probe: Detect Sonic Foundry Soft Encode AC3 as raw AC3.
Our ac3 code chain can handle it fine.
More ideal would be to write a demuxer that actually extracts what can be from the additional
headers and uses it for whatever it can be used for.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomjpeg: support mpo
Michael Niedermayer [Thu, 17 Nov 2011 02:13:50 +0000 (03:13 +0100)]
mjpeg: support mpo
Fixes stereoscopic_photo.mpo

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/release/0.7' into release/0.8
Michael Niedermayer [Sun, 20 Nov 2011 02:27:50 +0000 (03:27 +0100)]
Merge remote-tracking branch 'qatar/release/0.7' into release/0.8

* qatar/release/0.7:
  Add a version bump and APIchanges entry for avcodec_open2 and avformat_find_stream_info.
  lavf: fix multiplication overflow in avformat_find_stream_info()
  lavf: fix invalid reads in avformat_find_stream_info()
  lavf: add avformat_find_stream_info()
  lavc: fix parentheses placement in avcodec_open2().
  lavc: introduce avcodec_open2() as a replacement for avcodec_open().

Conflicts:
doc/APIchanges
libavcodec/utils.c
libavcodec/version.h
libavformat/avformat.h
libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAdd a version bump and APIchanges entry for avcodec_open2 and avformat_find_stream_info.
Anton Khirnov [Sat, 19 Nov 2011 07:51:26 +0000 (08:51 +0100)]
Add a version bump and APIchanges entry for avcodec_open2 and avformat_find_stream_info.

7 years agolavf: fix multiplication overflow in avformat_find_stream_info()
Mans Rullgard [Tue, 15 Nov 2011 22:33:49 +0000 (22:33 +0000)]
lavf: fix multiplication overflow in avformat_find_stream_info()

Converting to double before the multiplication rather than after
avoids an integer overflow in some cases.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavf: fix invalid reads in avformat_find_stream_info()
Anton Khirnov [Thu, 14 Jul 2011 01:08:53 +0000 (03:08 +0200)]
lavf: fix invalid reads in avformat_find_stream_info()

(cherry picked from commit e358f7ee90fec591348ca05dff94ebaf4c1a098b)

Conflicts:

libavformat/utils.c

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavf: add avformat_find_stream_info()
Anton Khirnov [Sun, 22 May 2011 17:24:59 +0000 (19:24 +0200)]
lavf: add avformat_find_stream_info()

It supports passing options to codecs.
(cherry picked from commit a67c061e0f3b55ffcc96f336fc0998e44b86c8e4)

Conflicts:

libavformat/utils.c

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavc: fix parentheses placement in avcodec_open2().
Baptiste Coudurier [Tue, 9 Aug 2011 06:41:50 +0000 (23:41 -0700)]
lavc: fix parentheses placement in avcodec_open2().

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavc: introduce avcodec_open2() as a replacement for avcodec_open().
Anton Khirnov [Sun, 22 May 2011 12:10:49 +0000 (14:10 +0200)]
lavc: introduce avcodec_open2() as a replacement for avcodec_open().

Adds support for decoder-private options and makes setting other options
simpler.
(cherry picked from commit 0b950fe240936fa48fd41204bcfd04f35bbf39c3)

Conflicts:

libavcodec/avcodec.h

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agorawdec: use a default sample rate if none is specified.
Michael Niedermayer [Fri, 18 Nov 2011 21:34:41 +0000 (22:34 +0100)]
rawdec: use a default sample rate if none is specified.
Fixes "ffmpeg -f s16le -i /dev/zero"

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorawdec: add check on sample_rate
Stefano Sabatini [Wed, 26 Oct 2011 23:38:21 +0000 (01:38 +0200)]
rawdec: add check on sample_rate

Prevent error condition in case sample_rate is unset or set to a negative
value. In particular, fix divide-by-zero error occurring in ffmpeg due to
sample_rate set to 0 in output_packet(), in code:

                ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
                    ist->st->codec->sample_rate;

Fix trac ticket #324.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoqdm2dec: check remaining input bits in the mainloop of qdm2_fft_decode_tones()
Michael Niedermayer [Fri, 18 Nov 2011 16:56:24 +0000 (17:56 +0100)]
qdm2dec: check remaining input bits in the mainloop of qdm2_fft_decode_tones()
This is neccessary but likely not sufficient to prevent out of array reads.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocinepak: check strip_size
Michael Niedermayer [Wed, 16 Nov 2011 16:21:42 +0000 (17:21 +0100)]
cinepak: check strip_size

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agowma: Check channel number before init.
Michael Niedermayer [Wed, 16 Nov 2011 02:31:25 +0000 (03:31 +0100)]
wma: Check channel number before init.
Fixes Ticket240

Based on patch by ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 20431a9982b9bd2c475042d919890a941ad70c71)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoDo not try to read 16bit gray png files with alpha channel.
Carl Eugen Hoyos [Sat, 12 Nov 2011 18:30:27 +0000 (19:30 +0100)]
Do not try to read 16bit gray png files with alpha channel.

FFmpeg does not support gray16a.
Fixes the crash in ticket #644.
(cherry picked from commit 0c5fd6372e6c257912d7ae64cbfc4d8541f0452f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocook: fix apparent typo in extradata parsing
K.Y.H [Thu, 10 Nov 2011 23:30:39 +0000 (00:30 +0100)]
cook: fix apparent typo in extradata parsing

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffplay: limit lowres to the maximum supported. Fixes Ticket591
Michael Niedermayer [Tue, 8 Nov 2011 02:14:13 +0000 (03:14 +0100)]
ffplay: limit lowres to the maximum supported. Fixes Ticket591

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit d8407ee2b1e9f62763a2f47d55f80f7993718c99)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agov4l2: fix uninitialized variable
Michael Niedermayer [Tue, 8 Nov 2011 00:20:35 +0000 (01:20 +0100)]
v4l2: fix uninitialized variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovf_transpose: remove pix_fmts which can currently not be supported.
Michael Niedermayer [Tue, 1 Nov 2011 22:45:28 +0000 (23:45 +0100)]
vf_transpose: remove pix_fmts which can currently not be supported.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp5: Fix illegal read.
Alex Converse [Thu, 17 Nov 2011 18:06:14 +0000 (10:06 -0800)]
vp5: Fix illegal read.

Found with Address Sanitizer
(cherry picked from commit bb4b0ad83b13c3af57675e80163f3f333adef96f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp6: Fix illegal read.
Thierry Foucu [Thu, 17 Nov 2011 17:39:52 +0000 (09:39 -0800)]
vp6: Fix illegal read.

Found with Address Sanitizer

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovf_transpose: avoid multiple calls to avfilter_draw_slice()
Stefano Sabatini [Fri, 29 Jul 2011 18:19:04 +0000 (20:19 +0200)]
vf_transpose: avoid multiple calls to avfilter_draw_slice()

avfilter_draw_slice() is already called in the end_frame() callback,
this avoids multiple calls. This is done by adding a null draw_slice()
callback.

In particular fix crash occurring with -vf transpose=3,hflip, fix trac
issue #371.
(cherry picked from commit d9c23a0d5a56488b146eef17a19a9b47643be333)

7 years agonuv: Fix combination of size changes and LZO compression.
Reimar Döffinger [Sat, 5 Nov 2011 21:34:09 +0000 (22:34 +0100)]
nuv: Fix combination of size changes and LZO compression.

There were multiple issues, for example might we have to re-run
the decompression when the size of the buffer increased,
we should always use a decompression buffer large enough for
the header (so we do not get stuck when the size is too small).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoav_lzo1x_decode: properly handle negative buffer length.
Reimar Döffinger [Sat, 5 Nov 2011 20:45:31 +0000 (21:45 +0100)]
av_lzo1x_decode: properly handle negative buffer length.

Treating them like 0 is safest, current code would invoke
undefined pointer arithmetic behaviour in this case.

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

7 years agolibavformat: add support for G726 audio decoder in RTP and RTSP streams
Miroslav Slugeň [Mon, 7 Nov 2011 11:13:55 +0000 (12:13 +0100)]
libavformat: add support for G726 audio decoder in RTP and RTSP streams
Fixes Ticket611

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

7 years agoDo not call parse_keyframes_index with NULL stream.
Reimar Döffinger [Wed, 19 Oct 2011 16:41:02 +0000 (18:41 +0200)]
Do not call parse_keyframes_index with NULL stream.

Seems to fix trac issue #569.
Sample is unfortunately not available, but it might be caused by
an index existing for non-existing audio stream (?).

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

7 years agoVersion numbers for 0.8.6 n0.8.6
Michael Niedermayer [Fri, 4 Nov 2011 12:37:27 +0000 (13:37 +0100)]
Version numbers for 0.8.6

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosnow: emu edge support
Michael Niedermayer [Wed, 26 Oct 2011 13:47:14 +0000 (15:47 +0200)]
snow: emu edge support
Fixes Ticket592

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoimc: validate channel count
Justin Ruggles [Fri, 28 Oct 2011 22:31:21 +0000 (18:31 -0400)]
imc: validate channel count

ask for a sample if not mono
(cherry picked from commit 7b7f47e73356d113cace74b922eee0b6ff5ffe0b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoimc: check for ff_fft_init() failure
Justin Ruggles [Fri, 28 Oct 2011 22:25:49 +0000 (18:25 -0400)]
imc: check for ff_fft_init() failure
(cherry picked from commit 95fee70d6773fde1c34ff6422f48e5e66f37f263)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibgsmdec: check output buffer size before decoding
Justin Ruggles [Fri, 28 Oct 2011 04:52:36 +0000 (00:52 -0400)]
libgsmdec: check output buffer size before decoding
(cherry picked from commit b03761b1309293bbf30edef767503875277b01cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoconfigure: fix arch x86_32
Michael Niedermayer [Tue, 1 Nov 2011 13:46:18 +0000 (14:46 +0100)]
configure: fix arch x86_32

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomp3enc: avoid truncating id3v1 tags by one byte
Tobias Rapp [Mon, 31 Oct 2011 14:11:37 +0000 (15:11 +0100)]
mp3enc: avoid truncating id3v1 tags by one byte

Avoid writing the trailing null-byte for id3v1 tags if length reaches max length.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoasfdec: Check packet_replic_size earlier
Michael Niedermayer [Mon, 31 Oct 2011 21:42:45 +0000 (22:42 +0100)]
asfdec: Check packet_replic_size earlier

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocin audio: validate the channel count
Justin Ruggles [Thu, 27 Oct 2011 17:33:57 +0000 (13:33 -0400)]
cin audio: validate the channel count

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobinkaudio: add some buffer overread checks.
Justin Ruggles [Tue, 25 Oct 2011 17:47:50 +0000 (13:47 -0400)]
binkaudio: add some buffer overread checks.

This stops decoding before overreads instead of after.
(cherry picked from commit 101ef19ef4dc9f5c3d536aee8fcc10fff2af4d9e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoatrac1: validate number of channels
Justin Ruggles [Fri, 14 Oct 2011 04:24:50 +0000 (00:24 -0400)]
atrac1: validate number of channels
(cherry picked from commit bff5b2c1ca1290ea30587ff2f76171f9e3854872)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoatrac1: check output buffer size before decoding
Justin Ruggles [Fri, 14 Oct 2011 04:16:31 +0000 (00:16 -0400)]
atrac1: check output buffer size before decoding
(cherry picked from commit 33684b9c12b74c0140fb91e8150263db4a48d55e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp3: fix oob read for negative tokens and memleaks on error.
Ronald S. Bultje [Sat, 29 Oct 2011 06:50:04 +0000 (23:50 -0700)]
vp3: fix oob read for negative tokens and memleaks on error.
(cherry picked from commit 8370e426e42f2e4b9d14a1fb8107ecfe5163ce7f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoapedec: set s->currentframeblocks after validating nblocks
Justin Ruggles [Tue, 11 Oct 2011 17:25:27 +0000 (13:25 -0400)]
apedec: set s->currentframeblocks after validating nblocks

7 years agoapedec: use unsigned int for 'nblocks' and make sure that it's within int range
Justin Ruggles [Tue, 11 Oct 2011 17:17:44 +0000 (13:17 -0400)]
apedec: use unsigned int for 'nblocks' and make sure that it's within int range

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoapedec: check for data buffer realloc failure
Justin Ruggles [Tue, 11 Oct 2011 16:47:11 +0000 (12:47 -0400)]
apedec: check for data buffer realloc failure
(cherry picked from commit 11ca8b2d7486e879926488404b3b79af774f0f2d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoapedec: check for filter buffer allocation failure
Justin Ruggles [Tue, 11 Oct 2011 15:47:15 +0000 (11:47 -0400)]
apedec: check for filter buffer allocation failure
(cherry picked from commit 7500781313d11b37772c05a28da20fbc112db478)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegaudiodec: check output data size based on avctx->frame_size
Justin Ruggles [Tue, 27 Sep 2011 18:27:43 +0000 (14:27 -0400)]
mpegaudiodec: check output data size based on avctx->frame_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoresample: Fix array size
Michael Niedermayer [Thu, 27 Oct 2011 13:26:45 +0000 (15:26 +0200)]
resample: Fix array size

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoresample2: fix potential overflow
Michael Niedermayer [Thu, 27 Oct 2011 12:34:45 +0000 (14:34 +0200)]
resample2: fix potential overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoresample: Fix overflow
Michael Niedermayer [Thu, 27 Oct 2011 12:31:53 +0000 (14:31 +0200)]
resample: Fix overflow

Found-by: Jim Radford
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotta: check for extradata allocation failure in tta demuxer
Justin Ruggles [Fri, 23 Sep 2011 23:22:06 +0000 (19:22 -0400)]
tta: check for extradata allocation failure in tta demuxer
(cherry picked from commit f540ca22c5fb4504d959c295f55591a9ec2a8859)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbisdec: check output buffer size before writing output
Justin Ruggles [Fri, 23 Sep 2011 23:56:58 +0000 (19:56 -0400)]
vorbisdec: check output buffer size before writing output
(cherry picked from commit 60aa1a358d9c1c8f891e72246d5dcd897857eca8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotwinvq: check output buffer size before decoding
Justin Ruggles [Fri, 23 Sep 2011 23:50:41 +0000 (19:50 -0400)]
twinvq: check output buffer size before decoding
(cherry picked from commit e53eecd0e7211973a1a9757f559bdd93a1848901)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp6: Fix illegal read.
Alex Converse [Thu, 3 Nov 2011 22:55:52 +0000 (15:55 -0700)]
vp6: Fix illegal read.
(cherry picked from commit 2a6eb06254df79e96b3d791b6b89b2534ced3119)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoshorten: check output buffer size before decoding
Justin Ruggles [Fri, 16 Sep 2011 22:01:28 +0000 (18:01 -0400)]
shorten: check output buffer size before decoding

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoshorten: check for realloc failure
Justin Ruggles [Thu, 15 Sep 2011 22:08:52 +0000 (18:08 -0400)]
shorten: check for realloc failure
(cherry picked from commit 9e5e2c2d010c05c10337e9c1ec9d0d61495e0c9c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegts: do not return from ff_mpegts_parse_packet() after having seen the first PMT
Laurent Aimar [Sat, 8 Oct 2011 21:40:41 +0000 (23:40 +0200)]
mpegts: do not return from ff_mpegts_parse_packet() after having seen the first PMT

It prevents leaving the AVPacket uninitialized.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegts: fix return value when enough ts packets have been parsed or when the first...
Laurent Aimar [Sat, 8 Oct 2011 21:40:40 +0000 (23:40 +0200)]
mpegts: fix return value when enough ts packets have been parsed or when the first PMT has been seen.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFixes avpicture_layout to not write past buffer end.
Matthew Einhorn [Thu, 25 Aug 2011 00:14:03 +0000 (20:14 -0400)]
Fixes avpicture_layout to not write past buffer end.

avpicture_get_size() returns the size of buffer required for avpicture_layout.
For pseudo-paletted formats (gray8...) this size does not include the palette.
However, avpicture_layout doesn't know this and still writes the palette. Consequently,
avpicture_layout writes passed the length of the buffer. This fixes it
by fixing avpicture_layout so that it doesn't write the palette for these formats.

Signed-off-by: Matthew Einhorn <moiein2000@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e662b263d9c500270a8f1dc7e1b81b51d5bdfd4e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavio: Check for invalid buffer length.
Alex Converse [Sat, 15 Oct 2011 01:27:59 +0000 (18:27 -0700)]
avio: Check for invalid buffer length.
(cherry picked from commit ab2940691ba76e1a9b0ce608db0dfc45021d741e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopthread: copy coded frame dimensions in update_context_from_thread
Ronald S. Bultje [Fri, 14 Oct 2011 21:46:06 +0000 (23:46 +0200)]
pthread: copy coded frame dimensions in update_context_from_thread

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp8: prevent read from uninitialized memory in decode_mvs
Ronald S. Bultje [Fri, 14 Oct 2011 21:43:29 +0000 (23:43 +0200)]
vp8: prevent read from uninitialized memory in decode_mvs

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp8: force reallocation in update_thread_context after frame size change
Ronald S. Bultje [Fri, 14 Oct 2011 21:27:52 +0000 (23:27 +0200)]
vp8: force reallocation in update_thread_context after frame size change

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp8: fix return value if update_dimensions fails
Ronald S. Bultje [Fri, 14 Oct 2011 21:21:46 +0000 (23:21 +0200)]
vp8: fix return value if update_dimensions fails

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomatroskadec: fix out of bounds write
Ronald S. Bultje [Fri, 14 Oct 2011 22:03:55 +0000 (00:03 +0200)]
matroskadec: fix out of bounds write

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomov: 10l: Terminate string with 0 not '0'
Alex Converse [Fri, 14 Oct 2011 17:38:42 +0000 (10:38 -0700)]
mov: 10l: Terminate string with 0 not '0'
(cherry picked from commit 7ad06beb2cf31d8a96f475361425d6cc95e8f176)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomov: Prevent illegal writes when chapter titles are very short.
Alex Converse [Thu, 13 Oct 2011 21:47:06 +0000 (14:47 -0700)]
mov: Prevent illegal writes when chapter titles are very short.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotruespeech: check to make sure channels == 1
Justin Ruggles [Thu, 13 Oct 2011 03:23:18 +0000 (23:23 -0400)]
truespeech: check to make sure channels == 1
(cherry picked from commit 3e7a176759e8a8e66d65c779b47b5bba793dfd4e)

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