8042 Commits

Author SHA1 Message Date
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
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
241f15f1c9 tta: check for extradata allocation failure in tta demuxer
(cherry picked from commit f540ca22c5fb4504d959c295f55591a9ec2a8859)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 03:18:52 +01:00
Laurent Aimar
cbfd34246c 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>
2011-11-04 01:23:56 +01:00
Laurent Aimar
feef77ec3a 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>
2011-11-04 01:23:52 +01:00
Alex Converse
e86e9f8b7a avio: Check for invalid buffer length.
(cherry picked from commit ab2940691ba76e1a9b0ce608db0dfc45021d741e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:23:33 +01:00
Ronald S. Bultje
d51c7b4cbe 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>
2011-11-04 01:22:38 +01:00
Alex Converse
e58870a587 mov: 10l: Terminate string with 0 not '0'
(cherry picked from commit 7ad06beb2cf31d8a96f475361425d6cc95e8f176)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:21:57 +01:00
Alex Converse
5c18bcfd9c mov: Prevent illegal writes when chapter titles are very short.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:11:18 +01:00
John Brooks
2c0cddf255 rtpdec: Read the packet length for all RTCP packet types
This allows skipping past unsupported RTCP packet types, as
RFC 3550 section 6.1 mandates.

Currently this only has any practical effect if a sender puts
an unrecognized type before RTCP_BYE in a compounded packet, or
(incorrectly) does not put RTCP_SR first.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:09:05 +01:00
John Brooks
d398d042c1 rtpdec: Fix the minimum packet length for RTCP SR packets
We actually read 20 bytes of these packets.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:08:54 +01:00
Alex Converse
9b6080f685 mxfdec: Fix some buffer overreads caused by the misuse of AVPacket related functions.
(cherry picked from commit 0c46e958d1fd3817b8e9fa048d0450d509c80378)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:02:29 +01:00
Laurent Aimar
b832e539c0 vqa: fix double free on corrupted streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e3123856c79c36507772ada1bcda6cfe36a1e297)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:00:58 +01:00
Mans Rullgard
edc942202b lavf: fix signed overflow in avformat_find_stream_info()
On the first iteration through this code, last_dts is always
INT64_MIN (AV_NOPTS_VALUE) and the subtraction overflows in
an invalid manner.  Although the result is only used if the
input values are valid, performing the subtraction is still
not allowed in a strict environment.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 01:00:18 +01:00
Compn
d33a1d6507 riff: map 0x0038 to amrnb, works on http://video.mopoto.com/4/40/407/40709.avi
(cherry picked from commit 3ebab62fc67591fd9313fad32892d7d32e805422)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 00:40:21 +01:00
Loren Osborn
b981c5d4e0 mpegtsenc: Lift limit on PMT PID
Fixes Ticket518
(cherry picked from commit bf5c3bac51e422580aad011fcd927c818542f054)
2011-10-11 21:34:14 +02:00
Carl Eugen Hoyos
638e183d11 Do not set codec_tag property for matroska muxers.
Fixes ticket #8, #537.
(cherry picked from commit 60171d8fa68e90bd623daba970a65c4171cac502)
2011-10-09 20:10:26 +02:00
Carl Eugen Hoyos
60171d8fa6 Do not set codec_tag property for matroska muxers.
Fixes ticket #8, #537.
2011-10-09 20:07:41 +02:00
Michael Niedermayer
a39b603bf6 lavf/utils: fix overestimation of the rational number density.
Fixes Ticket498

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-09 01:14:21 +02:00
Michael Niedermayer
57f51e843e lavf/utils: fix overestimation of the rational number density.
Fixes Ticket498

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-09 01:14:02 +02:00
Michael Niedermayer
7fc85451fd Merge branch 'release/0.8' into release/0.7
* release/0.8: (185 commits)
  h264: fix intra 16x16 mode check when using mbaff and constrained_intra_pred.
  h264: check for invalid bit depth value.
  h264: add entries for 11 and 12 bits in ff_h264_chroma_qp[][]
  h264: fix the check for invalid SPS:num_ref_frames.
  h264: do not let invalid values in h->ref_count on ff_h264_decode_ref_pic_list_reordering() errors.
  Reject video with non multiple of 16 width/height in the 4xm decoder.
  4xm decoder: fix data size for i2 frames.
  4xm decoder: print some error messages in case of errors.
  Check for out of bound accesses in the 4xm decoder.
  Prevent block size from inreasing in the shorten decoder.
  Check for out of bound reads in PTX decoder.
  Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffers used in 4xm decoder.
  Fix the check for missing references in ff_er_frame_end() for H264.
  Prevent NULL dereference when the huffman table is invalid in the 4xm decoder.
  Fix use of uninitialized memory in 4X Technologies demuxer.
  h264: increase ref_poc size to 32 as it can be per field.
  h264: set unused ref_counts to 0 as a precautionary meassure.
  Remove Chnagelog it has nothing to do with reality
  fate: fix motion pixels checksum change caused by backported bugfix
  avienc: Add a limit on the number of skiped frames muxed in a row.
  ...

Conflicts:
	Doxyfile
	RELEASE
	VERSION
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-02 21:37:59 +02:00
Laurent Aimar
2e342df4a2 Fix use of uninitialized memory in 4X Technologies demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a1876e0072aa0c69f037e0cafaca1a54bf2e189b)
2011-10-02 05:45:01 +02:00
Michael Niedermayer
b0804f3705 Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
* qatar/release/0.7: (73 commits)
  Update Changelog for 0.7.2 release
  Update RELEASE file for 0.7.2
  lavf: do not set codec_tag for rawvideo
  fate: allow testing with libavfilter disabled
  fate: separate lavf-mxf_d10 test from lavf-mxf
  Fix memory (re)allocation in matroskadec.c, related to MSVR-11-0080.
  movenc: fix NULL reference in mov_write_tkhd_tag
  movenc: create an alternate group for each media type
  flvdec: Check for overflow before allocating arrays
  ppc: fix some pointer to integer casts
  ppc: fix 32-bit PIC build
  rv34: Check for invalid slice offsets
  rv34: Fix potential overreads
  rv34: Avoid NULL dereference on corrupted bitstream
  rv10: Reject slices that does not have the same type as the first one
  lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails
  oggdec: fix out of bound write in the ogg demuxer
  Fixed size given to init_get_bits().
  smacker: fix a few off by 1 errors
  Check for invalid VLC value in smacker decoder.
  ...

Conflicts:
	RELEASE
	libavcodec/avs.c
	libavcodec/ppc/asm.S
	libavcodec/rv34.c
	libavcodec/xan.c
	libavdevice/alsa-audio.h
	libavformat/flvdec.c
	libavformat/gxf.c
	libavformat/utils.c
	libswscale/x86/swscale_template.c
	tests/ref/lavf/mov
	tests/ref/lavf/mxf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-01 22:42:41 +02:00
Michael Niedermayer
80331265ca avienc: Add a limit on the number of skiped frames muxed in a row.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9cb9e39c41959961bdb5a1fd51cdd25e10c050f3)
2011-10-01 21:04:04 +02:00
Laurent Aimar
67b704982f Fix double free on error in Deluxe Paint Animation demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d39d7122e34d2cf994d6dc474fe0c8bee2f7fcfd)
2011-10-01 20:59:42 +02:00
Laurent Aimar
fa79af6845 Check for out of bound writes in the avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5d44c061cf511d97be5fac8d76be2f3915c6e798)
2011-10-01 20:59:28 +02:00
Laurent Aimar
c23d5261f7 Check for corrupted data in avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1cce7def0a8eff2e7db294b7d195a0fb1a5043b0)
2011-10-01 20:59:20 +02:00
Martin Storsjö
932b5f3cbb lavf: Avoid using av_malloc(0) in av_dump_format
On OS X, av_malloc(0) returns pointers that cause crashes when
freed.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit e81e5e8ad2bb5746df0c343c396019aca165cf66)
2011-10-01 20:57:04 +02:00
Tomas Härdin
2451228b0c mov: Only touch extradata in mov_read_extradata() if codec_id is what we expect
Extradata should only be parsed from the avss, fiel, jp2h and alac atoms for
AVS, MJPEG, Motion JPEG 2000 and ALAC respectively.
This also fixes the mov demuxer coming up with bogus extradata for some
AVC-Intra samples due to the presence of fiel atoms.
(cherry picked from commit e571305a71494af195891e314b05936f040f89d3)
2011-10-01 20:53:53 +02:00
Nicolas George
17b6abab50 movenc: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 194c2432eecd97c36914956f3bf7781ac4fc6f3d)
2011-10-01 20:50:19 +02:00
Nicolas George
cfff8db729 gxfenc: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit af84d9bb9e8a69a715fc7596d6cbaa00ad00dc29)
2011-10-01 20:50:08 +02:00
Nicolas George
431937883f aviobuf: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 247a1dc84716cb033b538a5bd5ba8b33de0e8260)
2011-10-01 20:50:02 +02:00
Nicolas George
7bc9c32573 avienc: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e47cfe9e5c10eee3c8d0b6aff81792c0f10e66e1)
2011-10-01 20:49:55 +02:00
Nicolas George
1537f86a93 avidec: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 71e23d39a396f45bbdf258735b02a4bd5e25fd49)
2011-10-01 20:49:48 +02:00
Nicolas George
2a934e87b1 4xm: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0cc44facf17153454727c26f2f40ee2f77b90df5)
2011-10-01 20:49:41 +02:00
Laurent Aimar
521dbccc11 Fix return value on EOF in mpc v8 demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7ec5ea437fc88ca58d7ac3cd12dfa2f0fbd4011f)
2011-10-01 20:30:35 +02:00
Michael Niedermayer
e394f7984c psxstr: improve probe to not misdetect so much.
The score of 50 can probably be raised if needed
Fixes Ticket490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3f7dc480c1bf6abf4ac0f633a0c7e63d8eb29a55)
2011-10-01 19:31:06 +02:00
Michael Niedermayer
3aad92f3e6 lavf/utils: only complain about aspect missmatch when the difference is "meassureable"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e8d8517b160bd2dea1279d19ec0efd83e00c8c6c)
2011-10-01 19:30:49 +02:00
Michael Niedermayer
4d36f7cf88 avformat_free_context: favor av_freep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2a93f28a4b6eef8b93046e0b4e3225f2ff1e7324)
2011-10-01 01:32:37 +02:00
Mans Rullgard
e257eebd17 lavf: do not set codec_tag for rawvideo
If the demuxer did not set a codec_tag, there is none and
inventing one makes no sense.  This change stops the rawvideo
"decoder" over-writing user-supplied pixfmt with one derived
from the codec_tag.  The pixfmt-codec_tag-pixfmt round-trip
is lossy since several pixfmts map to the same codec_tag.

This fixes fate-lavf-pixfmt with avfilter disabled.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-09-30 15:37:05 +02:00
Michael Niedermayer
a2443e89d7 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>

(cherry picked from commit 77d2ef13a8fa630e5081f14bde3fd20f84c90aec)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-09-28 00:24:41 +02:00
Anton Khirnov
9f9b731a3a movenc: fix NULL reference in mov_write_tkhd_tag
st may be NULL when there are more mov streams than AVStreams, e.g. when
chapters are present.

(cherry picked from commit c92a2a4eb8b883e82871c2415f757153d263b6b3)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-09-27 20:57:08 +02:00
Anton Khirnov
ad47a5ec85 movenc: create an alternate group for each media type
Partially fixes bug 44.

(cherry picked from commit 7574cacbd5343bc303ee8333956274716e2444d5)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-09-27 20:57:08 +02:00
Michael Niedermayer
fed7f5b04f flvdec: Check for overflow before allocating arrays
On allocation, the array length is multiplied by sizeof(int64_t),
this prevents the multiplication from overflowing.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-09-26 19:31:32 +02:00
David Goldwich
9973ca992e 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-26 19:26:33 +02:00
Laurent Aimar
a3d471e500 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-26 19:26:33 +02:00
Laurent Aimar
54a178f28f 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-26 19:26:32 +02:00
Laurent Aimar
9f391c4971 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-26 19:26:32 +02:00
Laurent Aimar
4e7905fa9e 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-26 19:26:32 +02:00