Commit Graph

24534 Commits

Author SHA1 Message Date
Michael Niedermayer
9f91e7deec Merge commit '9e80eda26d06c7c48dbec5dfe643c857c62c0ee7'
* commit '9e80eda26d06c7c48dbec5dfe643c857c62c0ee7':
  h264_mp4toannexb_bsf: return a padded buffer

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 23:01:41 +02:00
Michael Niedermayer
0a5d22a195 Merge commit '8d929afd256069aa881f2bf58ef9f0ffce2d6b7e'
* commit '8d929afd256069aa881f2bf58ef9f0ffce2d6b7e':
  h264_mp4toannexb_bsf: factor out extradata parsing

Conflicts:
	libavcodec/h264_mp4toannexb_bsf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 22:51:56 +02:00
Michael Niedermayer
46a5003a4a Merge commit '5d21ca45591bb1c1d2265f8ed972d18c563f145e'
* commit '5d21ca45591bb1c1d2265f8ed972d18c563f145e':
  h264_mp4toannexb_bsf: K&R formatting cosmetics

Conflicts:
	libavcodec/h264_mp4toannexb_bsf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 22:40:43 +02:00
Kostya Shishkov
bbb2945f2d smacker: check the return value of smacker_decode_tree
Also prevent a memory leak.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:56:50 +02:00
Kostya Shishkov
f52edef301 smacker: fix an off by one in huff.length computation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:55:53 +02:00
Michael Niedermayer
3b86174290 avcodec/jpeg2000dec: move bpno check to a earlier place
This prevents additional integer overflows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 15:27:39 +02:00
Janne Grunau
985f34b756 utils: fix avcodec_flush_buffers pre-reference counting compatibility
The to_free AVframe must be freed just like the other ones.
Indeed, the calling application may expect all frames to be
released.

(This regression caused use-after-free in VLC with hwaccel.)

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:10:58 +02:00
Hendrik Leppkes
8962da9ec3 rawdec: allocate a buffer in the appropriate size in the copy case.
Otherwise the created buffer can be smaller than buf_size, which results
in buffer overreads if the original image has extra padding on every line.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 09:50:16 +02:00
Luca Barbato
f80b60ad59 bitstream: forward error values and drop few abort() 2013-06-16 09:30:26 +02:00
Luca Barbato
f776899a17 bitstream: K&R formatting cosmetics 2013-06-16 09:30:25 +02:00
Luca Barbato
9e80eda26d h264_mp4toannexb_bsf: return a padded buffer
The code using the returned buffer might expect it to be
FF_INPUT_BUFFER_PADDING_SIZE padded as any other avpacket.
2013-06-15 16:14:45 +02:00
Luca Barbato
8d929afd25 h264_mp4toannexb_bsf: factor out extradata parsing 2013-06-15 16:14:33 +02:00
Michael Niedermayer
6c4516d041 avcodec/vc1dec: Check source picture availability in vc1_mc_4mv_chroma4()
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-15 13:11:35 +02:00
Luca Barbato
5d21ca4559 h264_mp4toannexb_bsf: K&R formatting cosmetics 2013-06-15 09:11:13 +02:00
Michael Niedermayer
3c4c5ca1c1 avcodec/g2meet: Check monochrome cursor width
Fixes out of array write

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 21:14:31 +02:00
Michael Niedermayer
69e4d8e6a4 avcodec/jpeg2000dec: check len before parsing header
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 19:34:00 +02:00
Michael Niedermayer
5deb96c564 avcodec/jpeg2000dec: Check Psot
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 19:34:00 +02:00
Michael Niedermayer
7fff3df6b2 avcodec_encode_audio2: fix memleak on last padded frame
Regression introduced by 799f57ac96

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 15:21:23 +02:00
Hendrik Leppkes
59d3c24e28 vc1_parser: fix parsing of the frame headers in interlaced streams
first_pic_header_flag needs to be set to allow the parsing code to change
some stream parameters, and not error out.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 12:03:44 +02:00
Michael Niedermayer
e850a064ce jpeg2000dec: Check compno in get_coc()
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 01:55:43 +02:00
Michael Niedermayer
129edcb50f jpeg2000dec: dont set ncomponents to an invalid value
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 00:36:45 +02:00
Paul B Mahol
ff0bdf9375 lavc: copy AVCodecContext for threads
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-13 21:49:18 +00:00
Michael Niedermayer
c112e36d41 flacdec: Fix used AVCodecContext
Fixes out of array writes with multiple threads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 22:31:54 +02:00
Michael Niedermayer
a9821bdafb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  4xm: check bitstream_size boundary before using it

Conflicts:
	libavcodec/4xm.c

See: 9c661e95

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 14:51:59 +02:00
Michael Niedermayer
e9f2e9715b Merge commit 'fbd0dacc8d61ab418b3fa8e7be22017558323e56'
* commit 'fbd0dacc8d61ab418b3fa8e7be22017558323e56':
  4xm: refactor decode_p_block

Conflicts:
	libavcodec/4xm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 14:39:21 +02:00
Michael Niedermayer
27e8298c03 Merge commit '94aefb1932be882fd93f66cf790ceb19ff575c19'
* commit '94aefb1932be882fd93f66cf790ceb19ff575c19':
  4xm: do not overread the source buffer in decode_p_block

Conflicts:
	libavcodec/4xm.c

The checks are replaced by av_assert0() as the conditions should
be impossible. If these asserts fail, there is a bug elsewhere

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 14:10:06 +02:00
Michael Niedermayer
67d5d97cdc Merge commit 'be373cb50d3c411366fec7eef2eb3681abe48f96'
* commit 'be373cb50d3c411366fec7eef2eb3681abe48f96':
  4xm: do not overread the prestream buffer

Conflicts:
	libavcodec/4xm.c

See: 9c661e95
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 13:57:07 +02:00
Michael Niedermayer
dbddd587e1 Merge commit 'de2e5777e225e75813daf2373c95e223651fd89a'
* commit 'de2e5777e225e75813daf2373c95e223651fd89a':
  4xm: validate the buffer size before parsing it

Conflicts:
	libavcodec/4xm.c

See: 9c661e95

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 13:41:27 +02:00
Michael Niedermayer
f13f4d2b08 Merge commit '145023f57262d21474e35b4a6069cf95136339d4'
* commit '145023f57262d21474e35b4a6069cf95136339d4':
  4xm: reject frames not compatible with the declared version

See: c433823750

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 13:14:42 +02:00
Michael Niedermayer
18cb3d355f Merge commit '1f0c6075604c271d5627480f1243d22795f9a315'
* commit '1f0c6075604c271d5627480f1243d22795f9a315':
  4xm: drop pointless assert

Conflicts:
	libavcodec/4xm.c

The added condition is impossible to occur and thus is added to the assert.
The assert is not removed from the default case, as the default case cannot
occur. Thus either it should stay as is or the case as a whole be removed.
For extra safety, to ensure this doesnt change the assert is changed to
av_assert0()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 13:06:22 +02:00
Michael Niedermayer
e5558391b5 Merge commit 'b8b809908ec547b2609dbac24194f4fd2df61aea'
* commit 'b8b809908ec547b2609dbac24194f4fd2df61aea':
  4xm: forward errors from decode_p_block

Conflicts:
	libavcodec/4xm.c

Impossible to be false check has been replaced by av_assert0()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 12:24:00 +02:00
Michael Niedermayer
294af51401 Merge commit '50ec1db62d977b6e864f315a53c1c580a6d7efa4'
* commit '50ec1db62d977b6e864f315a53c1c580a6d7efa4':
  4xm: fold last_picture lazy allocation in decode_p_frame

Conflicts:
	libavcodec/4xm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 12:12:33 +02:00
Michael Niedermayer
60657ee37a Merge commit 'e7a44f87d07655ec0cd31c315936931674434340'
* commit 'e7a44f87d07655ec0cd31c315936931674434340':
  4xm: refactor fourxm_read_header

Conflicts:
	libavformat/4xm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 10:08:50 +02:00
Michael Niedermayer
5c3e5651dd Merge commit '08859d19b429c522d6494c186656f4a2d3ff8e21'
* commit '08859d19b429c522d6494c186656f4a2d3ff8e21':
  4xm: use the correct logging context
  g2meet: Fix a typo in the height comparison

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 09:41:45 +02:00
Michael Niedermayer
443b29e475 h264: Try parsing SPS as complete NAL in more cases
Fixes Ticket2580

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 01:43:09 +02:00
Michael Niedermayer
8aea2f05dc alacenc: Fix missing sign_extend()
Possibly fixes Ticket2497

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-12 16:23:49 +02:00
Luca Barbato
59d7bb99b6 4xm: check bitstream_size boundary before using it
Prevent buffer overread.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
fbd0dacc8d 4xm: refactor decode_p_block
Directly return from code 1, 2 and 6 codepaths and simplify the
remaining one to have a single overflow check and a single call to
mcdc.
2013-06-12 14:45:46 +02:00
Luca Barbato
94aefb1932 4xm: do not overread the source buffer in decode_p_block
Check for out of picture macroblocks before calling mcdc.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
be373cb50d 4xm: do not overread the prestream buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
de2e5777e2 4xm: validate the buffer size before parsing it
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
145023f572 4xm: reject frames not compatible with the declared version
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
1f0c607560 4xm: drop pointless assert
Make sure the value of wlog2 is always between 0 and 3.
2013-06-12 14:45:46 +02:00
Luca Barbato
b8b809908e 4xm: forward errors from decode_p_block
Partially mitigate out of memory writes.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
50ec1db62d 4xm: fold last_picture lazy allocation in decode_p_frame 2013-06-12 14:45:46 +02:00
Luca Barbato
e7a44f87d0 4xm: refactor fourxm_read_header
Split sound and video tag parsing in separate functions.
2013-06-12 14:45:46 +02:00
Luca Barbato
08859d19b4 4xm: use the correct logging context 2013-06-12 14:45:46 +02:00
Michael Niedermayer
7ad5708691 g2meet: Fix a typo in the height comparison
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-12 13:45:53 +02:00
Michael Niedermayer
d3c4ea8b35 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  g2meet: do not leak buffers
  g2meet: more graceful cursor loading
  g2meet: reset dimensions on header parsing errors

Conflicts:
	libavcodec/g2meet.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-12 11:53:27 +02:00
Kostya Shishkov
7dfc3381dd g2meet: do not leak buffers 2013-06-12 09:54:45 +02:00
Kostya Shishkov
4d960d7f60 g2meet: more graceful cursor loading 2013-06-12 09:54:45 +02:00
Kostya Shishkov
767ae86cee g2meet: reset dimensions on header parsing errors 2013-06-12 09:54:45 +02:00
Michael Niedermayer
73d5cf8f43 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: add a libwavpack encoder wrapper

Conflicts:
	Changelog
	doc/encoders.texi
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-11 09:36:34 +02:00
Michael Niedermayer
5d199c3ad9 Merge commit '799f57ac96f9891d1a0f7d6c4b218ed536e8aca5'
* commit '799f57ac96f9891d1a0f7d6c4b218ed536e8aca5':
  lavc: use AVFrame API properly in pad_last_frame().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-11 09:27:04 +02:00
Michael Niedermayer
175e916fa2 avcodec/utils: Fix encoder allocation size
Fixes Ticket2645
Found-by: Darrell Walisser
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-11 01:15:39 +02:00
Anton Khirnov
84d3ff50cd lavc: add a libwavpack encoder wrapper 2013-06-10 21:33:48 +02:00
Anton Khirnov
799f57ac96 lavc: use AVFrame API properly in pad_last_frame().
This also simplifies the code.
2013-06-10 21:19:51 +02:00
Michael Niedermayer
8e887ca1fe jpeg2000dec: Check bpno in decode_cblk()
Fixes integer overflow in fate-redcode-demux

Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-10 17:13:46 +02:00
Michael Niedermayer
e473f7e659 (lib)utvideodec: remove setting of color_primaries
Thanks-to: Paranoialmaniac
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-10 16:00:59 +02:00
Michael Niedermayer
9908607363 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  utvideodec: Set colorspace by codec_tag.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-10 10:43:43 +02:00
Stephen Hutchinson
3f54547709 utvideo: Add ULH0 and ULH2 decoding to the native decoder.
Also prevents an error since the native decoder (if enabled) is
always used to probe Ut Video-encoded files, even if the user
forces libutvideo to be the decoder. Without this patch, the probe
would fail, and the video wouldn't get properly handed over,
resulting in failure to set codec parameters. When the native
decoder is disabled, libutvideo can probe and initialize decoding
without issues.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-10 10:15:13 +02:00
Stephen Hutchinson
8ed6c13fe3 libutvideo: Add ULH0 and ULH2 decoding when using version 13.0.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-10 10:12:15 +02:00
Yusuke Nakamura
252ee3d39b utvideodec: Set colorspace by codec_tag.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-06-10 09:38:22 +02:00
Yusuke Nakamura
b441fdeb15 utvideodec: Support ULH0 and ULH2 formats.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-06-10 09:37:53 +02:00
Carl Eugen Hoyos
052838f765 Insert a newline before showing embedded svq1 messages.
Messages may start with a carriage return.
2013-06-09 19:25:43 +02:00
Michael Niedermayer
2d8f880a9b g2meet: fix typo in height comparission
Fixes CID1030349
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-09 16:55:10 +02:00
Michael Niedermayer
ada497e616 g2meet: Check cursor parameters before writing them in the context
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-09 12:00:57 +02:00
Michael Niedermayer
6d3bcbb211 avcodec/g2meet: check framebuf has been allocated before use
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-09 03:09:26 +02:00
Michael Niedermayer
9e9ec5ad2a smvjpegdec: No frame at all is an error
This fixes a infinite loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 20:02:22 +02:00
Paul B Mahol
b94f045b18 wavpack: add missing .\n to entropy error message
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-08 17:39:54 +00:00
Michael Niedermayer
f973f17416 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  faxcompr: return meaningful errors

Conflicts:
	libavcodec/faxcompr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 12:38:18 +02:00
Michael Niedermayer
a5a9bcc876 Merge commit 'f32aefcf349f2f1367f0143782397643416d18f3'
* commit 'f32aefcf349f2f1367f0143782397643416d18f3':
  faxcompr: K&R formatting cosmetics

Conflicts:
	libavcodec/faxcompr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 12:30:15 +02:00
Michael Niedermayer
d0b27eab92 Merge commit '9c2216976907336dfae0e8e38a4d70ca2465a92c'
* commit '9c2216976907336dfae0e8e38a4d70ca2465a92c':
  tiff: do not overread the source buffer

Conflicts:
	libavcodec/tiff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 12:21:14 +02:00
Michael Niedermayer
dc318505d0 Merge commit '999ccd2d0a43640921088578f138c874f6cc0f8a'
* commit '999ccd2d0a43640921088578f138c874f6cc0f8a':
  tiff: cleanup the error paths

Conflicts:
	libavcodec/tiff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 11:41:58 +02:00
Michael Niedermayer
1fec361f35 Merge commit '016c5b066de08a93a5f6b5beb0ef377356b35cde'
* commit '016c5b066de08a93a5f6b5beb0ef377356b35cde':
  tiff: refactor fax support in a separate function

Conflicts:
	libavcodec/tiff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 11:32:34 +02:00
Michael Niedermayer
a804632b15 Merge commit '103937681d7e6afd3e8caf8937272575e450fb55'
* commit '103937681d7e6afd3e8caf8937272575e450fb55':
  tiff: refactor deflate support in a separate function

Conflicts:
	libavcodec/tiff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 11:23:49 +02:00
Michael Niedermayer
e2d4bcd7b8 Merge commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1'
* commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1':
  h264_parser: K&R formatting cosmetics
  vorbis: return meaningful errors

Conflicts:
	libavcodec/h264_parser.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 10:50:24 +02:00
Michael Niedermayer
56abad0ee4 avcodec/smvjpegdec: copy palette too
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 01:20:55 +02:00
Michael Niedermayer
5b9917ec2b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Do not offer smvjpeg lowres capabilities, the decoder does not support it.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-07 21:38:54 +02:00
Michael Niedermayer
467e7a8f26 avcodec/smvjpegdec: check that frames_per_jpeg cleanly divides height
Fixes out of array access

If some valid files fail this check then please open a ticket and ping me and the smvjpegdec maintainer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-07 20:39:05 +02:00
Carl Eugen Hoyos
7ce011e054 Do not offer smvjpeg lowres capabilities, the decoder does not support it.
Reviewed-by: Ash Hughes
2013-06-07 19:40:03 +02:00
Luca Barbato
a3b2b83f01 faxcompr: return meaningful errors
And optionally forward them to the caller instead of concealing them.

Unify err and ret in a single variable.
2013-06-07 17:23:53 +02:00
Luca Barbato
f32aefcf34 faxcompr: K&R formatting cosmetics 2013-06-07 17:23:53 +02:00
Luca Barbato
9c22169769 tiff: do not overread the source buffer
At least 2 bytes from the source are read every loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-07 17:23:53 +02:00
Luca Barbato
999ccd2d0a tiff: cleanup the error paths
Return the proper error values and optionally report them.
2013-06-07 17:23:53 +02:00
Luca Barbato
016c5b066d tiff: refactor fax support in a separate function 2013-06-07 17:23:53 +02:00
Luca Barbato
103937681d tiff: refactor deflate support in a separate function
Report when zlib support is missing.
2013-06-07 17:23:53 +02:00
Luca Barbato
f8a4d5e970 h264_parser: K&R formatting cosmetics 2013-06-07 16:54:55 +02:00
Luca Barbato
92b3caa108 vorbis: return meaningful errors 2013-06-07 16:54:16 +02:00
Michael Niedermayer
bce2ed5559 smvjpegdec: only extract picture when a picture has been decoded.
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-07 14:36:45 +02:00
Paul B Mahol
dc5c029f02 sonicenc: don't allocate unused avctx->coded_frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-07 09:29:34 +00:00
Paul B Mahol
5285a7549f pcmenc: don't allocate unused avctx->coded_frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-07 09:29:34 +00:00
Paul B Mahol
739d6a78b7 alacenc: don't allocate unused avctx->coded_frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-07 09:29:33 +00:00
Paul B Mahol
86005184e3 tiff: simplify picking right pixel format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-06 21:42:02 +00:00
Paul B Mahol
61d900fd0d lavc: add ONLY_IF_THREADS_ENABLED where it is missing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-06 20:17:36 +00:00
Michael Niedermayer
ffb1051b9b jpeg2000: Zero prec->cblk
Prevent use of uninitialized memory / valgrind failure

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-06 22:02:54 +02:00
Michael Niedermayer
7c3a296b4f jpeg2000dec: fix av_log()
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-06 21:52:49 +02:00
Paul B Mahol
8cc8adaa88 tiff: correctly decode saparate planes with horizontal differencing predictor
Closes #2648.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-06 19:47:46 +00:00
Michael Niedermayer
21d0f75f29 jpeg2000dec: check that we have enough components for MCT
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-06 16:06:48 +02:00
Michael Niedermayer
c49d94487c jpeg2000dec: Use the matching coding style struct for transform selection
Fixes a null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-06 15:38:05 +02:00
Michael Niedermayer
b26bcd08e6 jpeg2000dec: Check that theres a SOT before SOD
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-06 10:51:07 +02:00
Michael Niedermayer
c51654fbc0 jpeg2000dec: Support 4 tile parts
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-06 03:10:42 +02:00
Paul B Mahol
a28f4fd1ea flacdec: don't call allocate_buffers() in init_thread_copy() when s->max_blocksize is 0
This is normal, and happens when no extradata was available at decoder
initialization.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-06 01:06:45 +00:00
Michael Niedermayer
c59ce1c98e get_qcc: Check compno
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-06 02:26:22 +02:00
Paul B Mahol
b28851a1d6 alac: frame multi-threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:32 +00:00
Paul B Mahol
9684d7f1a2 wavpack: frame multi-threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:32 +00:00
Paul B Mahol
495db0e3b0 ttadec: frame multi-threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:32 +00:00
Paul B Mahol
9300de0409 flacdec: frame multi-threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:31 +00:00
Paul B Mahol
d97044640c takdec: frame multi-threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:31 +00:00
Paul B Mahol
d5f7f1fef1 audio frame multi-threaded decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:31 +00:00
Michael Niedermayer
bbc19010ed jpeg2000dec: return error for invalid cdxy values
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 23:31:19 +02:00
Michael Niedermayer
2c2a8f70f5 jpeg2000: Make nreslevel fields int
This prevents potential integer overflows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 18:34:07 +02:00
Michael Niedermayer
66c4d54413 jpeg2000dec: Propagate error code from get_cox() correctly
Without this the context state could become inconsistent

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 18:34:07 +02:00
Michael Niedermayer
6e9bfc19bd jpeg2000: check that nreslevels2decode has been initialized before use
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 18:34:07 +02:00
Michael Niedermayer
3b58ab4c5f pngdec: dont treat mpng like png with key and non keyframes
Fixes Ticket2618

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-04 20:40:07 +02:00
Paul B Mahol
f5d5bc3493 tak: simplify ff_tak_check_crc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-04 17:25:32 +00:00
Michael Niedermayer
fca435fee1 vc1dec: Disable dead code
Fixes CID732197/6

A assert is added to check that the disabled code wont
be needed in the future.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-04 02:43:20 +02:00
Paul B Mahol
b4d4ef5529 flacdec: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-03 19:24:15 +00:00
Michael Niedermayer
e4bf3a97de Merge branch 'master' of https://github.com/upsuper/ffmpeg-vdadec
* 'master' of https://github.com/upsuper/ffmpeg-vdadec:
  vda_h264_dec: remove check_format

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 20:21:01 +02:00
Michael Niedermayer
bbae652113 tiff: fix memleak
Fixes CID1026764
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 14:59:52 +02:00
Michael Niedermayer
bbf43c70dd jpeg2000dec: assert that curtileno is valid when used
Fixes CID1026755
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 14:59:52 +02:00
Michael Niedermayer
234f76ae7d jpeg2000: Fix unintended sign extension in malloc arguments of prec
Fixes: CID1026772/3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 14:59:40 +02:00
Michael Niedermayer
d8c10324ed jpeg2000: Fix Unintended sign extension in malloc arguments of cblk.
Fixes CID1026770
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 14:16:19 +02:00
Michael Niedermayer
6952e2f82a h264_ps: fix memleak in ff_h264_decode_picture_parameter_set()
Fixes: CID1026763
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 14:09:12 +02:00
Michael Niedermayer
7e99d528f9 ffv1enc: Check return value of av_frame_ref()
Fixes CID1026740
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 14:06:25 +02:00
Michael Niedermayer
8a266aaaac avcodec/jpeg2000dwt: merge rescaling with interleave in 9/7 int IDWT
Tha fate tests change because the edge mirroring was wrong before this commit

Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 13:24:20 +02:00
Michael Niedermayer
96b71a6ec5 avcodec/jpeg2000dwt: merge rescaling with interleave in 9/7 float IDWT
10% faster

Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 13:18:40 +02:00
Michael Niedermayer
6507d86f07 jpeg2000dec; optimize output sample convert a bit
67935 -> 29984 kcycles

Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 13:00:50 +02:00
Michael Niedermayer
e5cdf9c03b Merge commit '2d66a58ccde05e764594bd7e5f0f9244634d0b2c'
* commit '2d66a58ccde05e764594bd7e5f0f9244634d0b2c':
  Go2Webinar decoder

Conflicts:
	Changelog
	configure
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/version.h
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 12:47:26 +02:00
Michael Niedermayer
5c43f3ddea Merge commit '31980b6abdd8ffb6953472a7a6b59f3aa5762c31'
* commit '31980b6abdd8ffb6953472a7a6b59f3aa5762c31':
  vmd: decode videos with no LZ buffer size provided - they might not need it

Conflicts:
	libavcodec/vmdav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 12:33:00 +02:00
Michael Niedermayer
c3660c3618 Merge commit '0aed0bfc62b273a780a2bfba3be56039fccd7423'
* commit '0aed0bfc62b273a780a2bfba3be56039fccd7423':
  vmd: fix mode 3 decoding

Conflicts:
	libavcodec/vmdav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 12:21:25 +02:00
Michael Niedermayer
7cb5467a52 Merge commit '46ce9ded96ffcb798b03da894cdb5fdac376a6ee'
* commit '46ce9ded96ffcb798b03da894cdb5fdac376a6ee':
  tiff: K&R formatting cosmetics

Conflicts:
	libavcodec/tiff.c
	libavcodec/tiff.h
	libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 11:44:11 +02:00
Kostya Shishkov
2d66a58ccd Go2Webinar decoder 2013-06-03 09:24:55 +02:00
Paul B Mahol
d2021f74ed jpeg2000dec: remove redundant error log message
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-03 00:20:08 +00:00
Paul B Mahol
a44d39ae42 wavpack: remove redundant error log message
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-03 00:20:04 +00:00
Paul B Mahol
0f740fea85 tta: use interger instead of pointer to iterate output samples for 24-bit case
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-02 22:43:31 +00:00
Paul B Mahol
e2f89f7804 tta: move GetBitContext out of private context
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-02 22:38:16 +00:00
Kostya Shishkov
31980b6abd vmd: decode videos with no LZ buffer size provided - they might not need it
The buffer is used for an additional pass of frame compression, so videos
can be coded without ever using it (and some are coded so indeed, e.g. in
Woodruff and the Schnibble of Azimuth game).
2013-06-02 19:08:09 +02:00
Kostya Shishkov
0aed0bfc62 vmd: fix mode 3 decoding 2013-06-02 19:07:31 +02:00
Diego Biurrun
46ce9ded96 tiff: K&R formatting cosmetics 2013-06-02 17:59:34 +02:00
Paul B Mahol
514cb9bb92 tta encoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-02 15:16:52 +00:00
Paul B Mahol
2e67dde954 tta: move code that will be shared with encoder to separate file
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-02 14:53:14 +00:00
Carl Eugen Hoyos
a4b5863eea Fix compilation of libavcodec/tiff.c 2013-06-02 16:50:39 +02:00
Paul B Mahol
379ad9788b tiff: planar rgb
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-02 14:22:40 +00:00
Michael Niedermayer
a40370661d use Kostyas full name in copyrights
This fixes 2 files that where not part of the original change
See: de421b2085

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 11:25:56 +02:00
Michael Niedermayer
4d4f5911d3 Merge commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f'
* commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f':
  network: factor out bind-listening code
  use my full first name instead of short one in copyrights

Conflicts:
	libavformat/tcp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 10:30:35 +02:00
Paul B Mahol
58b36959dd tta: use get_unary()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-01 23:06:04 +00:00
Clément Bœsch
534f1a2821 lavc/avcodec: decodimg → decoding. 2013-06-01 19:16:45 +02:00
Matthew Heaney
8f75ba9926 lavf/webvttdec: save cue id and settings as side data
Currently the WebVTT demuxer parses the cues but throws away
the cue id (the optional first line of the cue) and cue
settings (the optional rendering instructions that follow
the timestamp).

However, in order to write inband text tracks (to WebM
files), the entire cue payload from the WebVTT source must
be preserved.

This commit makes no change to the data part of the output
buffer packet (where the actual cue text is stored), but
does add the cue id and settings as a side data items, if
they're present in the cue. Existing code that cares only
about the data part of the packet can continue to ignore the
side data.

There are two new packet data type flags,
AV_PKT_DATA_WEBVTT_IDENTIFIER and
AV_PKT_DATA_WEBVTT_SETTINGS.
2013-06-01 15:12:49 +02:00
Clément Bœsch
151b4947e5 lavc/avpacket: fill padding area on side data split.
The padding data is assumed to be 0 in several places, notably in
subtitles. This problem was not detected with fate-sub-srt test because
the first element of the side data (x1) is 0 in the test, so the
trailing side data present in the packet wasn't read by the decoder. The
issue can be observed with a large enough x1.

It is also noted in FF_INPUT_BUFFER_PADDING_SIZE doxy that MPEG
bitstreams require that padding with 0, so it might fix other issues.
2013-06-01 15:12:49 +02:00