Commit Graph

24455 Commits

Author SHA1 Message Date
Michael Niedermayer
8689ee0eef sonic: simplify shift_down()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22 21:34:11 +02:00
Hendrik Leppkes
d76fff7df7 smvjpeg: use refcounted frames to avoid mem leaks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22 11:58:46 +02:00
Hendrik Leppkes
1a405c683e smvjpeg: remove redundant frame init code
avctx->coded_frame is not used for decoders anymore,
and av_frame_alloc does all the frame initialization required.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 21:53:34 +02:00
Michael Niedermayer
d6a33f5d20 h264: fix size of arrays in ff_h264_check_intra_pred_mode()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 20:48:07 +02:00
Michael Niedermayer
2005fddcbb h264/ff_h264_check_intra_pred_mode: fix input value check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 20:48:07 +02:00
Hendrik Leppkes
659df32a9d mathops/x86: work around inline asm miscompilation with GCC 4.8.1
The volatile is not required here, and prevents a miscompilation with GCC
4.8.1 when building on x86 with --cpu=i686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 12:47:03 +02:00
Michael Niedermayer
79cd5d39ba avcodec/utvideodec: Fix vlc len
Fixes regression / Ticket2661

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 03:22:02 +02:00
Michael Niedermayer
c17dd513e7 bytestream2_init: assert that buf_size is valid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 00:58:41 +02:00
Michael Niedermayer
32fc8d6db6 avcodec/jpeg2000dec: check that tp_end is after the start
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 00:58:41 +02:00
Michael Niedermayer
ddefb80c95 sonicenc: fix off by 1 error
Fixes out of array accesses

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19 10:06:38 +02:00
Michael Niedermayer
694c2d1ab3 sonicenc: dont put multiple assignments per line
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19 10:06:10 +02:00
Michael Niedermayer
6df61c3ae0 sonicenc: set supported samples formats array
This ensures that only supported formats are input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19 09:50:01 +02:00
Janne Grunau
2ee380aefb vaapi: return early from ff_vaapi_render_picture() without picture
Fixes an assertion when called on uninitialized frame. Spotted after
seeking in vlc.
Fixes ticket #2461.

Tested-by: Timo
Reviewed-by: Joakim Plate
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2013-06-18 01:56:06 +02:00
Carl Eugen Hoyos
28bf0d94aa Revert "vaapi: return early from ff_vaapi_render_picture() without picture"
This reverts commit 4cbf245f2a2cd2170ca30b0788c2af5b506fe6d6.

I messed up the author information.
2013-06-18 01:54:30 +02:00
Carl Eugen Hoyos
3cbf245f2a vaapi: return early from ff_vaapi_render_picture() without picture
Fixes an assertion when called on uninitialized frame. Spotted after
seeking in vlc.
Fixes ticket #2461.

Tested-by: Timo
Reviewed-by: Joakim Plate
2013-06-18 00:21:09 +02:00
Michael Niedermayer
582f53349e jpeg2000dec: make cblk->length(inc)/data use consistent
Fixes Ticket2612

Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 20:08:51 +02:00
Michael Niedermayer
6c655b40ea Merge commit 'bbb2945f2dfbc2306c1655bf7eb6e220912a9a7c'
* commit 'bbb2945f2dfbc2306c1655bf7eb6e220912a9a7c':
  smacker: check the return value of smacker_decode_tree

Conflicts:
	libavcodec/smacker.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 00:36:25 +02:00
Michael Niedermayer
85a3d20da5 Merge commit 'f52edef30197735bfb937e9e723ab1e7b31165c6'
* commit 'f52edef30197735bfb937e9e723ab1e7b31165c6':
  smacker: fix an off by one in huff.length computation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 00:34:07 +02:00
Michael Niedermayer
a4a2e894fc Merge commit '985f34b75653d02eda8eb8def3412f8577f19b01'
* commit '985f34b75653d02eda8eb8def3412f8577f19b01':
  utils: fix avcodec_flush_buffers pre-reference counting compatibility

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 00:21:22 +02:00
Michael Niedermayer
301522f521 Merge commit 'f80b60ad59945dae32bb26a4e239ed94b0e92fa3'
* commit 'f80b60ad59945dae32bb26a4e239ed94b0e92fa3':
  bitstream: forward error values and drop few abort()

Conflicts:
	libavcodec/bitstream.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 23:29:37 +02:00
Michael Niedermayer
9265bae356 Merge commit 'f776899a17dce32ad7fb9231d98f15558f37cc3f'
* commit 'f776899a17dce32ad7fb9231d98f15558f37cc3f':
  bitstream: K&R formatting cosmetics

Conflicts:
	libavcodec/bitstream.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 23:18:57 +02:00
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