49096 Commits

Author SHA1 Message Date
Luca Barbato
5a01ab0e62 vmd: use the PALETTE_COUNT constant uniformly
While at it drop useless parentheses.
(cherry picked from commit 91a6944e56236234f0a7ba162404665753cbcb51)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-01 05:38:38 +02:00
Luca Barbato
dbaf3f7b0b vmd: drop incomplete chunks and spurious samples
Odd chunk size makes no sense for stereo and incomplete chunks are
not supported.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 701966730ce10290fd49c5ccedd73f505680f764)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:14:01 +02:00
Alexandra Khirnova
4f6fbe47a9 vmdav: convert to bytestream2
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 0afcf97e1ece51d29bb791698b00cd1b7ba97dcf)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/vmdav.c
2013-05-31 23:00:31 +02:00
Luca Barbato
7251de3032 wavpack: use bytestream2 in wavpack_decode_block
Prevent most out of buffer reads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 3f0b6d7a6248a33df37b98cfcb37a1acce263f62)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/wavpack.c
2013-05-31 23:00:31 +02:00
Luca Barbato
5ba83e9091 wavpack: return meaningful errors
And forward those that were already meaningful.
(cherry picked from commit 8c34558131d846d2b10389564caadaa206372fd4)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/wavpack.c
2013-05-31 23:00:31 +02:00
Luca Barbato
93fbf034c9 wavpack: check packet size early
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit fd06291239c1bb616bf303b5696cc432710b2530)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:31 +02:00
Anton Khirnov
10f77c165c pixdesc: mark gray8 as pseudopal
Many functions treat it as such already.
Fixes Bug 499.

CC:libav-stable@libav.org
(cherry picked from commit f36d7831d96aeb072db5a2b78892a534d96e288e)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:31 +02:00
Luca Barbato
5a8dcc993d vmd: return meaningful errors
CC: libav-stable@libav.org
(cherry picked from commit c8f3cb9119c2183680d44a509a1b5a9817a3bee9)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/vmdav.c
2013-05-31 23:00:31 +02:00
Luca Barbato
aed12df7fe mjpegdec: validate parameters in mjpeg_decode_scan_progressive_ac
Prevent out of buffer write when decoding broken samples.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit cfbd98abe82cfcb9984a18d08697251b72b110c8)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:31 +02:00
Luca Barbato
7923a25fdd mjpeg: Validate sampling factors
They must be non-zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 8aa3500905fec6c4e657bb291b861d43c34d3de9)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:31 +02:00
Luca Barbato
510a96a211 ljpeg: use the correct number of components in yuv
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit a030279a67ef883df8cf3707774656fa1be81078)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:31 +02:00
Luca Barbato
0af5a774eb jpegls: check the scan offset
Prevent an out of array bound write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit abad374909e6416e941351094f4f1446a71f8d23)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/jpeglsdec.c
2013-05-31 23:00:30 +02:00
Luca Barbato
aaeef7fa0d mjpegdec: properly report unsupported disabled features
When JPEG-LS support is disabled the decoder would feed the
data to the JPEG Lossless decode_*_scan function resulting in
faulty decoding.

CC: libav-stable@libav.org
(cherry picked from commit b25e49b187617c486ae3f50a5cbb356fc0e868bb)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:30 +02:00
Luca Barbato
c340319559 wavpack: validate samples size parsed in wavpack_decode_block
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit ed50673066956d6f2201a57c3254569f2ab08d9d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/wavpack.c
2013-05-31 23:00:30 +02:00
Reinhard Tartler
582aec4989 jpegls: factorize return paths
Conflicts:
	libavcodec/jpeglsdec.c

(cherry picked from commit 4a4107b48944397c914aa39ee16a82fe44db8c4c)
2013-05-31 23:00:30 +02:00
Reinhard Tartler
2c23237cb4 Prepare for 9.7 Release 2013-05-31 23:00:30 +02:00
Luca Barbato
9eecf633f7 jpegls: return meaningful errors
(cherry picked from commit a5a0ef5e13a59ff53318a45d77c5624b23229c6f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/jpeglsdec.c
2013-05-31 23:00:30 +02:00
Jindrich Makovicka
7f451cb01f mpegvideo: allocate sufficiently large scratch buffer for interlaced vid
MPV_decode_mb_internal needs 3 * 16 * linesize bytes of scratch buffer

For interlaced content, linesize is multiplied by two after the allocation
of the scratch buffer, and the dest_cr pointer ends past the buffer.

This patch makes ff_mpv_frame_size_alloc allocate a total of
(aligned line_size) * 2 * 16 * 3 bytes, which suffices even for the
interlaced case.

CC:libav-stable@libav.org

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 259af1b92370b32f6d0b9a6de314db4b44c2481d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:30 +02:00
Michael Niedermayer
a987750267 h264_cavlc: fix reading skip run
Fixes Ticket2606

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

Conflicts:
	libavcodec/h264_cavlc.c
2013-05-30 22:35:21 +02:00
Michael Niedermayer
2416eff5b9 ff_read_timestamp: check stream_index before using it as array index
Fixes out of array read

Fixes ticket #2609.

Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 695a766bff4cd8414a84e58159506d72b4e44892)
2013-05-30 11:05:58 +02:00
Michael Niedermayer
414c6bf094 avienc: Disallow the first frame to be skiped
Fixes Ticket2386

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc0db8cf3042186d8355dcf10be67071cfbbcc5d)
2013-05-27 23:52:26 +02:00
Michael Niedermayer
6f585f1e66 smacker: remove av_clip_int16()
Fixes Ticket2425

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2211c76287e073a9e176fde7dbb9a63ceb2af8d1)
2013-05-20 23:59:09 +02:00
Michael Niedermayer
85277ff936 ffmpeg: free threads on error conditions.
Fixes Ticket2562

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1a36c756d8959207d3386f03e11c15216abc50b7)
2013-05-17 23:23:57 +02:00
Michael Niedermayer
f544553c29 avidec: dont randomly skip packets for offseting the index
Fixes Ticket2490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6c593f1b671b7725b8c36f92f7c0a23ccf8e7628)
2013-05-17 22:53:19 +02:00
Carl Eugen Hoyos
51ee51b5eb Do not read strd chunk in avi files as H264 extradata.
Fixes ticket #2561.
(cherry picked from commit 231b3317184790b6be4b4619d96fd328f13aeabb)
2013-05-13 14:38:15 +02:00
Michael Niedermayer
2e00dd4d62 Update for 1.1.5
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n1.1.5
2013-05-13 00:59:36 +02:00
Michael Niedermayer
91138821fb gifdec: check that the last keyframe exists and has been successfully parsed.
Prevents inconsistent state and null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 46cb61819d867961e8f2052a8f13bcf2027d484f)

Conflicts:

	libavcodec/gifdec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:58:49 +02:00
Michael Niedermayer
a4681d1043 gifdec: reset previous Graphic Control Extension disposal type
This fixes out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d23b8462b5a4a9da78ed45c4a7a3b35d538df909)

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

Conflicts:

	libavcodec/gifdec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:46:27 +02:00
Michael Niedermayer
151c2ca8c7 avcodec/cdgraphics: check buffer size before use
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ad002e1a13a8df934bd6cb2c84175a4780ab8942)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:45:21 +02:00
Michael Niedermayer
dafd8228bc sanm: Check dimensions before use
Fixes integer overflow and out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9dd04f6d8cdd1c10c28b2cb4252c1a41df581915)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:45:16 +02:00
Clément Bœsch
d9ab7c6292 cmdutils: avtool -> fftool
(cherry picked from commit 7d8ad6c1fa11ec548fc63427656989e0e7c6af8b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:45:09 +02:00
Michael Niedermayer
426715ccbd avutil/intfloat_readwrite: include common.h for isinf()
Solution based on rational.c, which uses isinf() too

This should fix compilation with msvc

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:45:02 +02:00
Michael Niedermayer
a4e3bb0106 avutil/intfloat_readwrite: avoid comparission with INFINITY, use isinf()
Should fix pgc warning

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:56 +02:00
Michael Niedermayer
cd2d8aca84 avutil/log: Fix context pointer used for get_category()
Fixes calling a random pointer

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7edb984dd051b6919d7d8471c70499273f31b0fa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:52 +02:00
Michael Niedermayer
e9d9fd1137 vmdav: Try to fix unpack_rle()
This fixes out of array accesses
The code prior to this commit could not have worked, thus obviously
was untested. I was also not able to find a valid sample that uses this
code.
This fix is thus only based on the description of the format

If someone has a sample that uses unpack_rle(), please mail me.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c1f2c4c3b49277d65b71ccdd3b6b2878f1b593eb)

Conflicts:

	libavcodec/vmdav.c

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:44 +02:00
Michael Niedermayer
e4bae0a140 mmvideo/mm_decode_intra: check horizontal coordinate too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ae2132ac90f02330b0988e6e26ee0d53e41cd196)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:27 +02:00
Michael Niedermayer
520c3d2303 mmvideo/mm_decode_inter: check horizontal coordinate too
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8d3c99e825317b7efda5fd12e69896b47c700303)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:22 +02:00
Michael Niedermayer
82a627c2c3 mjpegdec: fix overlapping memcpy with upscale_v
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b39fd7d63648442c20671c3e4b357268ec5c49f2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:12 +02:00
Michael Niedermayer
0cb4887b83 avcodec/mpegvideo: Fix edge emu with lowres
Fixes a few green artifacts at the top
Fixes rest of Ticket 2535

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:43:04 +02:00
Michael Niedermayer
4a45535836 avcodec/mpegvideo: Fix block height for lowres 3 interlaced blocks
Fixes green trash
Fixes part of Ticket2535

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:42:33 +02:00
Michael Niedermayer
4427e96bb1 src_movie: fix scanf string
Fixes out of array accesses

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:35:04 +02:00
Michael Niedermayer
731f4bb6fd xbmdec: fix off by one error in scanf()
Fixes out of array access

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:35:04 +02:00
Michael Niedermayer
898ce4d6e2 Merge remote-tracking branch 'qatar/release/9' into release/1.1
* qatar/release/9:
  update Changelog
  af_asyncts: fix offset calculation
  oma: properly forward errors in oma_read_packet
  indeo3: use unaligned reads on reference blocks.

Conflicts:
	Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 14:39:09 +02:00
Michael Niedermayer
93f80cf2cc Merge commit '1ab4578c88dc3e1407da15471bd323ba40c3ebbb' into release/1.1
* commit '1ab4578c88dc3e1407da15471bd323ba40c3ebbb':
  lavc: Fix assignments in if() when calling ff_af_queue_add
  wav: Always seek to an even offset
  swscale: Use alpha from the right row in yuva2rgba_c
  Prepare for 9.6 Release

Conflicts:
	RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 14:31:59 +02:00
Michael Niedermayer
204c8798a8 Merge commit '0662967d2bbdbe90540eaa8c847f521fa4b75aab' into release/1.1
* commit '0662967d2bbdbe90540eaa8c847f521fa4b75aab':
  hls, segment: fix splitting for audio-only streams.
  afifo: fix request_samples on the last frame in certain cases
  id3v2: check for end of file while unescaping tags
  indeo3: fix off by one in MV validity check

Conflicts:
	libavformat/id3v2.c
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 14:25:50 +02:00
Michael Niedermayer
9767d7513c Merge commit '46fd6e4f2ebbcd5a00847cdb05fe416466d06d37' into release/1.1
* commit '46fd6e4f2ebbcd5a00847cdb05fe416466d06d37':
  aac: check the maximum number of channels
  update Changelog
  riff: check for eof if chunk size and code are 0
  oggdec: fix faulty cleanup prototype

Conflicts:
	Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 14:11:03 +02:00
Michael Niedermayer
d2b9da2f37 Merge commit 'c8462bd17f35f435192281a2ea4ce8008a7398d3' into release/1.1
* commit 'c8462bd17f35f435192281a2ea4ce8008a7398d3':
  mp3dec: fallback to generic seeking when a TOC is not present
  svq1dec: clip motion vectors to the frame size.
  svq1dec: check that the reference frame has the same dimensions as the current one
  qdm2: check that the FFT size is a power of 2

Conflicts:
	libavcodec/svq1dec.c
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 13:55:06 +02:00
Michael Niedermayer
395538e073 Merge commit '95db1624ef98ccc4ba7ff70d50c4b4d0f8ffed54' into release/1.1
* commit '95db1624ef98ccc4ba7ff70d50c4b4d0f8ffed54':
  indeo3: switch parsing the header to bytestream2
  indeo3: check motion vectors.
  rv10: check that extradata is large enough
  indeo3: fix data size check

Conflicts:
	libavcodec/indeo3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 13:44:08 +02:00
Michael Niedermayer
a367ab657f Merge commit '8f558c3e101859aec9adcb4b4b270ae1ef8f88b5' into release/1.1
* commit '8f558c3e101859aec9adcb4b4b270ae1ef8f88b5':
  af_channelmap: sanity check input channel indices in all cases.
  id3v2: pad the APIC packets as required by lavc.
  lavf: make sure stream probe data gets freed.
  dfa: check for invalid access in decode_wdlt().

Conflicts:
	libavformat/id3v2.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 13:35:30 +02:00
Michael Niedermayer
63235b8d41 Merge commit '858864d350320dd807e349bda017026e61a47fe0' into release/1.1
* commit '858864d350320dd807e349bda017026e61a47fe0':
  xmv: check audio track parameters validity.
  bmv: check for len being valid in bmv_decode_frame().
  xmv: do not leak memory in the error paths in xmv_read_header()
  matroska: pass the lace size to the matroska_parse_rm_audio

Conflicts:
	libavformat/matroskadec.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 13:19:54 +02:00