1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

25550 Commits

Author SHA1 Message Date
Michael Niedermayer
54197c7aae skip_bits: dont call UPDATE_CACHE
UPDATE_CACHE isnt needed and can cause segfaults

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 14:34:12 +02:00
Michael Niedermayer
bbe50a8001 Merge commit 'ff07ec143ebd3833fd5a3f4b6c00474ac523a31f'
* commit 'ff07ec143ebd3833fd5a3f4b6c00474ac523a31f':
  pcx: Return an error on broken palette if err_detect is set to 'explode'

Conflicts:
	libavcodec/pcx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:54:59 +02:00
Michael Niedermayer
c955bac7d5 Merge commit 'd1d99e3befea5d411ac3aae72dbdecce94f8b547'
* commit 'd1d99e3befea5d411ac3aae72dbdecce94f8b547':
  pcx: Check the packet size before assuming it fits a palette

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:49:21 +02:00
Michael Niedermayer
1eead87766 Merge commit '7ba0cedbfeff5671b264d1d7e90777057b5714c6'
* commit '7ba0cedbfeff5671b264d1d7e90777057b5714c6':
  rpza: Fix a buffer size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:42:33 +02:00
Michael Niedermayer
1ad36551ec Merge commit 'aa0dd52434768da64f1f3d8ae92bcf980c1adffc'
* commit 'aa0dd52434768da64f1f3d8ae92bcf980c1adffc':
  xxan: Disallow odd width

See: 77693c541a
See: 8ad9b48c9b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:41:17 +02:00
Michael Niedermayer
7d7fb61e0d Merge commit 'fc739b3eefa0b58d64e7661621da94a94dbc8a82'
* commit 'fc739b3eefa0b58d64e7661621da94a94dbc8a82':
  xan: Only read within the data that actually was initialized

Conflicts:
	libavcodec/xan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:21:30 +02:00
Michael Niedermayer
b6dfb82913 Merge commit '30db94dc399f6e4ef8905049d9b740556f0fce47'
* commit '30db94dc399f6e4ef8905049d9b740556f0fce47':
  xan: Use bytestream2 to limit reading to within the buffer

Conflicts:
	libavcodec/xan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:12:15 +02:00
Michael Niedermayer
a612bb3099 Merge commit '9fb0de86b49e9fb0709a8ad1e1875e35da841887'
* commit '9fb0de86b49e9fb0709a8ad1e1875e35da841887':
  pcx: Consume the whole packet if giving up due to missing palette

Conflicts:
	libavcodec/pcx.c

See: b4e516e30e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:00:50 +02:00
Michael Niedermayer
9834874f8c Merge commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7'
* commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7':
  pngdec: Stop trying to decode once inflate returns Z_STREAM_END

Conflicts:
	libavcodec/pngdec.c

See: 65bf9a44d7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 00:40:17 +02:00
Michael Niedermayer
9e58d46edf Merge commit '59480abce7e4238e22b3a4a904a9fe6abf4e4188'
* commit '59480abce7e4238e22b3a4a904a9fe6abf4e4188':
  alac: Do bounds checking of lpc_order read from the bitstream

See: fd4f4923cc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 23:17:45 +02:00
Michael Niedermayer
4be0c6ed20 avcodec/tiff_common: fix bprint max sizes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 21:28:22 +02:00
Martin Storsjö
ff07ec143e pcx: Return an error on broken palette if err_detect is set to 'explode'
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 21:05:16 +03:00
Martin Storsjö
d1d99e3bef pcx: Check the packet size before assuming it fits a palette
This fixes reads out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:03:12 +03:00
Martin Storsjö
7ba0cedbfe rpza: Fix a buffer size check
We read 2 bytes for 15 out of 16 pixels, therefore we need to
have at least 30 bytes, not 16.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:42 +03:00
Martin Storsjö
aa0dd52434 xxan: Disallow odd width
Decoded data is always written in pairs within this decoder.
This fixes writes out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:32 +03:00
Martin Storsjö
fc739b3eef xan: Only read within the data that actually was initialized
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:19 +03:00
Martin Storsjö
30db94dc39 xan: Use bytestream2 to limit reading to within the buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:50 +03:00
Martin Storsjö
9fb0de86b4 pcx: Consume the whole packet if giving up due to missing palette
Previously, we returned 0, meaning successful decoding but 0
bytes consumed, leading to an infinite loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:29 +03:00
Martin Storsjö
a81cad8f86 pngdec: Stop trying to decode once inflate returns Z_STREAM_END
If the input buffer contains more data after the deflate stream,
the loop previously left running infinitely, with inflate returning
Z_STREAM_END.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:03 +03:00
Martin Storsjö
59480abce7 alac: Do bounds checking of lpc_order read from the bitstream
In lpc_prediction(), we write up to array element 'lpc_order' in
an array allocated to hold 'max_samples_per_frame' elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:57:10 +03:00
Michael Niedermayer
e40c96513e avcodec/exif: print bytes and undefined types as scalar lists
This prevents odd characters from ending in the fate test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 12:19:47 +02:00
Michael Niedermayer
7859e89ff0 avcodec/tiff_common: add ff_tadd_bytes_metadata()
The le argument is passed so the function has the same prototype as the
other similar functions. It is otherwise unused

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 12:19:47 +02:00
Ronald S. Bultje
face578d56 Rewrite emu_edge functions to have separate src/dst_stride arguments.
This allows supporting files for which the image stride is smaller than
the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file
or a 16x16 VP8 file with -fflags +emu_edge.
2013-09-28 20:28:08 -04:00
Ronald S. Bultje
f574b4da56 vp8: use 2 registers for dst_stride and src_stride in neon bilin filter. 2013-09-28 20:25:29 -04:00
Michael Niedermayer
2b834a0605 avcodec/huffman: Allow specifying nb_bits to ff_huff_build_tree()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 20:33:56 +02:00
Michael Bradshaw
f46a3e3d6e libopenjpeg: fix encoding of odd sized subsampled images
Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 15:04:48 +02:00
Ronald S. Bultje
c341f734e5 Convert multiplier for MV from int to ptrdiff_t.
This prevents emulated_edge_mc from not undoing mvy*stride-related
integer overflows.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 11:28:09 +02:00
Michael Niedermayer
3e0c78bac6 avcodec/imc: Check flcoeffs5
Fixes infinite loop
Fixes Ticket2996

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 23:13:29 +02:00
Michael Niedermayer
f7bea731d9 avcodec/mlpdec: Fail if the input is too small
This fixes a infinite loop
Fixes Ticket2986

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 20:12:37 +02:00
Michael Niedermayer
b654aa6beb Merge commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3'
* commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3':
  pcm: support 24-bit/32-bit little-endian planar

Conflicts:
	doc/general.texi
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/pcm.c
	libavcodec/version.h
	libavformat/nut.c

See: 467dfd5dfa
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 13:05:05 +02:00
Paul B Mahol
7e52080cb1 pcm: support 24-bit/32-bit little-endian planar
Used by LXF.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Michael Niedermayer
f31011e9ab avcodec/parser: reset indexes on realloc failure
Fixes Ticket2982

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 21:03:48 +02:00
Michael Niedermayer
851a6e2f1a avcodec/wmalosslessdec: Fix return code for invalid buffer sizes
Fixes infinite loop
Fixes Ticket2979

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 21:50:27 +02:00
Paul B Mahol
f5498ef38d avcodec/flicvideo: fix infinite loops
Fixes #2995.
Reported-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-25 19:45:49 +00:00
Michael Niedermayer
c99d27287d avcodec/wmaprodec: check that there are input bits left in decode_subframe_length()
Fixes infinite loop
Fixes Ticket2987

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 20:10:24 +02:00
Michael Niedermayer
45f0623ae3 avcodec/lagarith: check scaled probabilities
Prevents infinite loop
Fixes Ticket2988

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 18:26:13 +02:00
Kostya Shishkov
4370f65be8 g2meet: Respect cursor_stride properly everywhere
This fixes a regression with rgb cursors since b1e46988.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-25 17:42:01 +03:00
Michael Niedermayer
ab6fbe8206 avcodec/cabac: remove h264_lps_state
The only use case of it was the selftest code, and there the slightly more
complex indexing that is needed after its removial doesnt matter.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 16:30:25 +02:00
Michael Niedermayer
c3c6999ea1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc doxy: document that avcodec_flush_buffers() invalidates decoded frames

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 11:02:32 +02:00
Michael Niedermayer
4a89868c5f Merge commit 'cab8c5f8e140c96ba3725ab709d823abfd1e31a5'
* commit 'cab8c5f8e140c96ba3725ab709d823abfd1e31a5':
  h264: do not reinitialize the global cabac tables at each slice header

See: 1e2e2c8095
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 10:25:17 +02:00
Michael Niedermayer
b0b66269f4 Merge commit 'e880418660c80e2f12a123e131975cdb6b12cd13'
* commit 'e880418660c80e2f12a123e131975cdb6b12cd13':
  cabac: remove write-only h264_mps_state[]

Conflicts:
	libavcodec/cabac.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 10:02:09 +02:00
Michael Niedermayer
65bf9a44d7 avcodec/pngdec: check for stream end in png_decode_idat()
Fix infinite loop
Fix Ticket2978

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 02:17:36 +02:00
Michael Niedermayer
bb4b041df3 avcodec/mpegvideo_enc: check qmin/qmax
Fixes Ticket2990

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 00:44:17 +02:00
Michael Niedermayer
c88ac1e023 avcodec/g2meet: fix regression with rgb cursors
Fixes Ticket2972

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 00:25:23 +02:00
Anton Khirnov
5f4b1b1cbd lavc doxy: document that avcodec_flush_buffers() invalidates decoded frames 2013-09-24 17:34:00 +02:00
Michael Niedermayer
dcc7686ae7 avcodec/mpegvideo: drop emu edge check from chroma_4mv_motion_lowres()
This is in line with the other functions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-24 17:15:24 +02:00
Anton Khirnov
cab8c5f8e1 h264: do not reinitialize the global cabac tables at each slice header 2013-09-24 17:13:52 +02:00
Anton Khirnov
e880418660 cabac: remove write-only h264_mps_state[] 2013-09-24 17:13:17 +02:00
Michael Niedermayer
1fb0d96114 Merge commit 'a454dec19aa6666b555deec431bc42eda391d7b6'
* commit 'a454dec19aa6666b555deec431bc42eda391d7b6':
  pixdesc: fix NV20* descriptors
  h264_sei: check SEI size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-24 15:51:08 +02:00
Michael Niedermayer
d195e6e410 Merge commit '71cabb521ac397db3903011d2de7afd3e0fc7ab6'
* commit '71cabb521ac397db3903011d2de7afd3e0fc7ab6':
  h264: do not discard NAL_SEI when skipping frames

Conflicts:
	libavcodec/h264.c

See: 7d75fb381b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-24 15:38:34 +02:00