31587 Commits

Author SHA1 Message Date
Michael Niedermayer
4e9b2c5732 Update for 0.7.8
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.7.8
2011-11-21 20:00:13 +01:00
Michael Niedermayer
a12dec4699 Merge branch 'release/0.8' into release/0.7
* release/0.8: (31 commits)
  svq1dec: call avcodec_set_dimensions() after dimensions changed. Fixes NGS00148
  vp3dec: Check coefficient index in vp3_dequant() Fixes NGS00145
  qdm2dec: fix buffer overflow. Fixes NGS00144
  h264: Fix invalid interlaced progressive MB combinations for direct mode prediction. Fixes Ticket312
  mpegvideo: dont use ff_mspel_motion() for vc1 Fixes Ticket655
  imgutils: Fix illegal read.
  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.
  mjpeg: support mpo Fixes stereoscopic_photo.mpo
  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().
  rawdec: use a default sample rate if none is specified. Fixes "ffmpeg -f s16le -i /dev/zero"
  rawdec: add check on sample_rate
  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.
  cinepak: check strip_size
  wma: Check channel number before init. Fixes Ticket240
  Do not try to read 16bit gray png files with alpha channel.
  ...

Conflicts:
	libavcodec/version.h
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-21 19:41:08 +01:00
Michael Niedermayer
661ee45f88 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>
2011-11-21 18:31:30 +01:00
Michael Niedermayer
fa5292d9d4 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>
2011-11-21 18:31:23 +01:00
Michael Niedermayer
a6a61a6d1d 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>
2011-11-21 18:29:17 +01:00
Michael Niedermayer
b8fc301769 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>
2011-11-21 16:48:40 +01:00
Michael Niedermayer
9b667da05d 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>
2011-11-21 16:48:25 +01:00
Thierry Foucu
4007352bd0 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>
2011-11-21 16:48:18 +01:00
Michael Niedermayer
5c6a2d9878 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>
2011-11-21 16:47:53 +01:00
Michael Niedermayer
17c54e9317 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>
2011-11-21 16:47:49 +01:00
Michael Niedermayer
14d4eee547 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>
2011-11-20 03:27:50 +01:00
Anton Khirnov
07624cfeaa Add a version bump and APIchanges entry for avcodec_open2 and avformat_find_stream_info. 2011-11-19 10:22:27 +01:00
Mans Rullgard
d6f763659c 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>
2011-11-19 10:22:27 +01:00
Anton Khirnov
e297459eb6 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>
2011-11-19 10:22:27 +01:00
Anton Khirnov
afe2726089 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>
2011-11-19 10:22:27 +01:00
Baptiste Coudurier
23f0d0f16b 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>
2011-11-19 10:22:27 +01:00
Anton Khirnov
47953c33ea 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>
2011-11-19 10:22:26 +01:00
Michael Niedermayer
64a854d06b 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>
2011-11-18 23:09:56 +01:00
Stefano Sabatini
91805f06a3 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 .

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 21:33:11 +01:00
Michael Niedermayer
8120a1d9bd 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>
2011-11-18 21:05:12 +01:00
Michael Niedermayer
211a107208 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>
2011-11-18 21:05:12 +01:00
Michael Niedermayer
fdd09e5d7b 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>
2011-11-18 21:05:12 +01:00
Carl Eugen Hoyos
00d35e82b2 Do not try to read 16bit gray png files with alpha channel.
FFmpeg does not support gray16a.
Fixes the crash in ticket .
(cherry picked from commit 0c5fd6372e6c257912d7ae64cbfc4d8541f0452f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 21:05:12 +01:00
K.Y.H
807342e1cf 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>
2011-11-18 21:05:12 +01:00
Michael Niedermayer
abaf8c386e 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>
2011-11-18 21:05:12 +01:00
Michael Niedermayer
e5578ad3cd v4l2: fix uninitialized variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 21:05:12 +01:00
Michael Niedermayer
4e0fae982e 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>
2011-11-18 21:05:12 +01:00
Alex Converse
f62fa1ce9f vp5: Fix illegal read.
Found with Address Sanitizer
(cherry picked from commit bb4b0ad83b13c3af57675e80163f3f333adef96f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 14:29:52 +01:00
Thierry Foucu
8a63deab15 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>
2011-11-18 14:29:52 +01:00
Stefano Sabatini
87ae12009e 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 .
(cherry picked from commit d9c23a0d5a56488b146eef17a19a9b47643be333)
2011-11-13 23:23:03 +01:00
Stefano Sabatini
fe06305b0d 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 .
(cherry picked from commit d9c23a0d5a56488b146eef17a19a9b47643be333)
2011-11-13 23:22:06 +01:00
Reimar Döffinger
3970d4e728 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>
2011-11-08 20:38:31 +01:00
Reimar Döffinger
80a173a33b 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)
(cherry picked from commit 0411b1928965050a940155984a16ad82fe462fc1)
2011-11-08 20:37:05 +01:00
Reimar Döffinger
d58c5586ec 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>
2011-11-08 19:48:14 +01:00
Reimar Döffinger
0411b19289 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)
2011-11-08 19:45:12 +01:00
Miroslav Slugeň
fd30240e98 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)
2011-11-08 19:04:26 +01:00
Reimar Döffinger
d484a07f1c Do not call parse_keyframes_index with NULL stream.
Seems to fix trac issue .
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)
2011-11-08 19:03:42 +01:00
Reimar Döffinger
54e4bf3296 Do not call parse_keyframes_index with NULL stream.
Seems to fix trac issue .
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)
2011-11-08 19:03:22 +01:00
Michael Niedermayer
8045254bac update versions for 0.7 branch
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.7.7
2011-11-04 22:05:34 +01:00
Michael Niedermayer
3e17543491 Merge branch 'release/0.8' into release/0.7
* release/0.8: (96 commits)
  Version numbers for 0.8.6
  snow: emu edge support Fixes Ticket592
  imc: validate channel count
  imc: check for ff_fft_init() failure (cherry picked from commit 95fee70d6773fde1c34ff6422f48e5e66f37f263)
  libgsmdec: check output buffer size before decoding (cherry picked from commit b03761b1309293bbf30edef767503875277b01cf)
  configure: fix arch x86_32
  mp3enc: avoid truncating id3v1 tags by one byte
  asfdec: Check packet_replic_size earlier
  cin audio: validate the channel count
  binkaudio: add some buffer overread checks.
  atrac1: validate number of channels (cherry picked from commit bff5b2c1ca1290ea30587ff2f76171f9e3854872)
  atrac1: check output buffer size before decoding (cherry picked from commit 33684b9c12b74c0140fb91e8150263db4a48d55e)
  vp3: fix oob read for negative tokens and memleaks on error. (cherry picked from commit 8370e426e42f2e4b9d14a1fb8107ecfe5163ce7f)
  apedec: set s->currentframeblocks after validating nblocks
  apedec: use unsigned int for 'nblocks' and make sure that it's within int range
  apedec: check for data buffer realloc failure (cherry picked from commit 11ca8b2d7486e879926488404b3b79af774f0f2d)
  apedec: check for filter buffer allocation failure (cherry picked from commit 7500781313d11b37772c05a28da20fbc112db478)
  mpegaudiodec: check output data size based on avctx->frame_size
  resample: Fix array size
  resample2: fix potential overflow
  ...

Conflicts:
	Doxyfile
	RELEASE
	VERSION

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 20:20:37 +01:00
Michael Niedermayer
1e1015fd22 Version numbers for 0.8.6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.8.6
2011-11-04 13:37:27 +01:00
Michael Niedermayer
c4a34f4025 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>
2011-11-04 13:36:28 +01:00
Justin Ruggles
cba03dc667 imc: validate channel count
ask for a sample if not mono
(cherry picked from commit 7b7f47e73356d113cace74b922eee0b6ff5ffe0b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 13:34:42 +01:00
Justin Ruggles
5a3f494466 imc: check for ff_fft_init() failure
(cherry picked from commit 95fee70d6773fde1c34ff6422f48e5e66f37f263)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 13:34:35 +01:00
Justin Ruggles
112431705d libgsmdec: check output buffer size before decoding
(cherry picked from commit b03761b1309293bbf30edef767503875277b01cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 13:33:38 +01:00
Michael Niedermayer
864581fea3 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>
2011-11-04 13:33:33 +01:00
Tobias Rapp
d8acee792f 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>
2011-11-04 13:32:59 +01:00
Michael Niedermayer
0e3dec6b08 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>
2011-11-04 13:32:50 +01:00
Justin Ruggles
711e6c947b cin audio: validate the channel count
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 13:32:18 +01:00
Justin Ruggles
8491677ab6 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>
2011-11-04 13:31:15 +01:00