Commit Graph

66569 Commits

Author SHA1 Message Date
Michael Niedermayer
12d6bbf7cb Merge commit '1fd55ec507f6f47b4d9fddf8e79a0df4540ef6e4' into release/2.4
* commit '1fd55ec507f6f47b4d9fddf8e79a0df4540ef6e4':
  svq1dec: Unbreak the scratch buffer allocation

Conflicts:
	libavcodec/svq1dec.c

See: 4213fc5b9e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-18 00:05:18 +01:00
Michael Niedermayer
0d801c0bfd Merge commit '20f9cf744a9a82ac4b269cb4317a5d59a8553baf' into release/2.4
* commit '20f9cf744a9a82ac4b269cb4317a5d59a8553baf':
  vaapi: wrap codec specific functions in appropiate #ifs

Conflicts:
	libavcodec/vaapi.c

See: f2118d44c9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:58:28 +01:00
Michael Niedermayer
9d43e51eec Merge commit '20d6ae4626a42fbc6e7b9c0040bdd64397b23e11' into release/2.4
* commit '20d6ae4626a42fbc6e7b9c0040bdd64397b23e11':
  hevc: always clip luma_log2_weight_denom

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:56:07 +01:00
Michael Niedermayer
73046fa195 Merge commit '23fe589e19487bc9a40b77dae9509068da5b14b8' into release/2.4
* commit '23fe589e19487bc9a40b77dae9509068da5b14b8':
  prores: Evaluate all the quantizers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:55:12 +01:00
Michael Niedermayer
0295615f0a Merge commit '9bd4561d74a46dd6557140e286228e09e380674c' into release/2.4
* commit '9bd4561d74a46dd6557140e286228e09e380674c':
  tiff: Check the check_size() return value and forward it

Conflicts:
	libavcodec/tiffenc.c

See: d50aa006fb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:25:41 +01:00
Michael Niedermayer
c69fff3790 Merge commit 'cbf31d5f15774b3ffd1e2009159dc7154a767b09' into release/2.4
* commit 'cbf31d5f15774b3ffd1e2009159dc7154a767b09':
  rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:23:27 +01:00
Michael Niedermayer
3c33983b74 Merge commit '21683549edf436024cc3efbc4f8d1d55221c5336' into release/2.4
* commit '21683549edf436024cc3efbc4f8d1d55221c5336':
  h261dec: Fix context initialization sequence

See: 6c1ee1a114
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:22:54 +01:00
Michael Niedermayer
e7b8fa2c00 Merge commit 'cbfdbba58e1460bd0791911ad84a6c76b5500a0e' into release/2.4
* commit 'cbfdbba58e1460bd0791911ad84a6c76b5500a0e':
  cmdutils: check file access functions return values

Conflicts:
	cmdutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:14:06 +01:00
Michael Niedermayer
0afeb76e75 Merge commit '1411f073fdceeff1f39dbaa035c3c0275f69095f' into release/2.4
* commit '1411f073fdceeff1f39dbaa035c3c0275f69095f':
  aacenc: correctly check returned value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:08:10 +01:00
Michael Niedermayer
98d4a07ccf Merge commit '76e9a17f3392e752193015765e9216c2f0716b96' into release/2.4
* commit '76e9a17f3392e752193015765e9216c2f0716b96':
  lavfi: always check av_expr_parse_and_eval() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:07:18 +01:00
Michael Niedermayer
3cc8822c93 Merge commit '3d0752d82f8eaa326cff306ae50b0186a5b4d304' into release/2.4
* commit '3d0752d82f8eaa326cff306ae50b0186a5b4d304':
  xsub: Support DXSA subtitles

Conflicts:
	libavcodec/xsubdec.c

See: d6f910ea47
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:01:33 +01:00
Michael Niedermayer
05b1ac2470 Merge commit 'bfe18be88a66da25b60a091de6011197dcb231fd' into release/2.4
* commit 'bfe18be88a66da25b60a091de6011197dcb231fd':
  mpeg4audio: check the init_get_bits() return value

Conflicts:
	libavcodec/mpeg4audio.c

See: deefdf9788
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 23:00:30 +01:00
Michael Niedermayer
cc598bf7dc Merge commit 'f6c82b34a320f105af266997f5951cbe7dfc8a05' into release/2.4
* commit 'f6c82b34a320f105af266997f5951cbe7dfc8a05':
  segment: Fix the failure paths

Conflicts:
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 22:56:52 +01:00
Michael Niedermayer
dd4adba811 Merge commit '3280b86c85f5a88397fce0230d1878fee79fbb93' into release/2.4
* commit '3280b86c85f5a88397fce0230d1878fee79fbb93':
  swscale: check memory allocations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 22:47:02 +01:00
Michael Niedermayer
ee910aef38 Merge commit '61335ab33e594d47b84fde7367ee10dc66fc3465' into release/2.4
* commit '61335ab33e594d47b84fde7367ee10dc66fc3465':
  opt: check memory allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 22:43:37 +01:00
Michael Niedermayer
cdf37f2548 Merge commit '932caa50a5dec7f2a69da8a417ccae84d19ae5e5' into release/2.4
* commit '932caa50a5dec7f2a69da8a417ccae84d19ae5e5':
  libavformat: Check for malloc failures in avformat_new_stream

See: a66893ac94
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 22:40:39 +01:00
wm4
b96163f055 avformat/utils: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a66893ac94)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 22:39:23 +01:00
Michael Niedermayer
1fd7fb9036 Update for 2.4.6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 17:14:46 +01:00
Michael Niedermayer
1fd55ec507 svq1dec: Unbreak the scratch buffer allocation
The input packets are always assumed to be padded and
the av_fast_ family of function takes a pointer to a pointer.

Thanks to Nicolas Dufresne <nicolas.dufresne@collabora.com> for
a similar patch.

Introduced in 7b588bb691.

Bug-Id: 766
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:16:05 +01:00
Thiago Santos
20f9cf744a vaapi: wrap codec specific functions in appropiate #ifs
Fix linking when only a subset of vaapi decoders is enabled.

Bug-Id: 760
CC: libav-stable@libav.org

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:16:05 +01:00
Vittorio Giovara
20d6ae4626 hevc: always clip luma_log2_weight_denom
Its value shall be between 0 and 7 according to the specifications.

CC: libav-stable@libav.org
Bug-Id: CID 1257502
2015-01-12 23:16:05 +01:00
Luca Barbato
23fe589e19 prores: Evaluate all the quantizers
Prevent an uninitialized data access.

CC: libav-stable@libav.org
Bug-Id: CID 703824 / CID 703825
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:15:19 +01:00
Luca Barbato
9bd4561d74 tiff: Check the check_size() return value and forward it
Also use the same type for add_entry and check_size.

Bug-Id: CID 700699
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovarao@gmail.com>
2015-01-12 23:15:03 +01:00
Martin Storsjö
cbf31d5f15 rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit df07c07b3d)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:14:38 +01:00
Michael Niedermayer
21683549ed h261dec: Fix context initialization sequence
ff_mpv_common_init sets s->context_initialized.

This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 3bb465245f)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:14:26 +01:00
Vittorio Giovara
cbfdbba58e cmdutils: check file access functions return values
CC: libav-stable@libav.org
Bug-Id: CID 703706
(cherry picked from commit 38129c26c5)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:14:06 +01:00
Vittorio Giovara
1411f073fd aacenc: correctly check returned value
CC: libav-stable@libav.org
(cherry picked from commit 971099ff5a)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:12:25 +01:00
Vittorio Giovara
76e9a17f33 lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org
Bug-Id: CID 703624
(cherry picked from commit 63be97ec40)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:12:10 +01:00
Alexandre Colucci
3d0752d82f xsub: Support DXSA subtitles
These have a DXSA tag and contain alpha in addition to
color values for palette.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 5a1addd7c1)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:23:35 +01:00
Anton Khirnov
bfe18be88a mpeg4audio: check the init_get_bits() return value
Fixes possible invalid reads.

CC:libav-stable@libav.org
(cherry picked from commit 7e4e010b80)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:21:54 +01:00
Luca Barbato
f6c82b34a3 segment: Fix the failure paths
A failure in segment_end() or segment_start() would lead to freeing
a dangling pointer and in general further calls to seg_write_packet()
or to seg_write_trailer() would have the same faulty behaviour.

CC: libav-stable@libav.org
Reported-By: luodalongde@gmail.com
(cherry picked from commit b3f0465736)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:21:39 +01:00
Vittorio Giovara
3280b86c85 swscale: check memory allocations
CC: libav-stable@libav.org
Bug-Id: CID 1257779
(cherry picked from commit 1dd797e3c9)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:19:55 +01:00
Vittorio Giovara
61335ab33e opt: check memory allocation
CC: libav-stable@libav.org
Bug-Id: CID 1257771
(cherry picked from commit 07a0c0f000)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:19:38 +01:00
Martin Storsjö
932caa50a5 libavformat: Check for malloc failures in avformat_new_stream
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9f810a9b37)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:19:11 +01:00
Andreas Cadhalpun
9cc1d21e76 doc/examples: fix lib math dep for decoding_encoding
It uses at least sin().

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f97f2a3527)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 05:03:51 +01:00
Michael Niedermayer
0b0293ceaf avformat/movenc: workaround bug in "PathScale EKOPath(tm) Compiler Suite Version 4.0.12.1"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7824dc5150)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 05:02:19 +01:00
wm4
1b3332659a vp9: fix parser return values in error case
The parser must always set the out_size and out_data pointers. The API
seems to require it, and the common code in parser.c also relies on it.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:41 +01:00
Michael Niedermayer
07c9df792c ffmpeg: Clear error message array at init.
This avoids printing uninitialized bytes if no error message is set

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:41 +01:00
wm4
3b4e9dddcf avcodec/dvdsubdec: fix accessing dangling pointers
dvdsub_decode() can call append_to_cached_buf() 2 times, the second time
with ctx->buf as argument. If the second append_to_cached_buf() reallocs
ctx->buf, the argument will be a pointer to the previous, freed block.
This can cause invalid reads at least with some fuzzed files - and
possibly with valid files.

Since packets can apparently not be larger than 64K (even if packets are
combined), just use a fixed size buffer. It will be allocated as part of
the DVDSubContext, and although some memory is "wasted", it's relatively
minimal by modern standards and should be acceptable.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:41 +01:00
wm4
2ba1af5791 avcodec/dvdsubdec: error on bitmaps with size 0
Attemtping to decode them could lead to invalid writes with some fuzzed
samples.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:41 +01:00
James Almer
51e880fed9 configure: bump year
Happy new year!
(cherry picked from commit b8db25a333)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Michael Niedermayer
86f4ac9365 avformat/mov: Fix mixed declaration and statement warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit db27f50e06)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Michael Niedermayer
fe457ce4d1 cmdutils: Use 64bit for file size/offset related variable in cmdutils_read_file()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 369b4cd412)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Michael Niedermayer
4506958289 avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bbfca8e84b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Michael Niedermayer
6300790144 avformat/matroskadec: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6e70e4aca5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Paul B Mahol
20a4cf0d09 lavfi: check av_strdup() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 145a84717b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Dale Curtis
54b76eb595 mov: Fix negative size calculation in mov_read_default().
The previous code assumed if an atom was marked with a 64-bit
size extension, it actually had that data available. The new
code verfies there's enough data in the atom for this to be
done.

Failure to verify causes total_size > atom.size which will
result in negative size calculations later on.

Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ebd76a9c5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Michael Niedermayer
0787163cf3 avformat/mov: fix integer overflow in mov_read_udta_string()
Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3859868c75)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
Dale Curtis
134ff88c6a mov: Avoid overflow with mov_metadata_raw()
The code previously added 1 to len without checking its size,
resulting in an overflow which can corrupt value[-1] -- which
may be used to store unaligned ptr information for certain
allocators.

Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00
wm4
e2e145db89 avcodec/dvdsubdec: fix out of bounds accesses
The code blindly trusted buffer offsets read from the file in the RLE
decoder. Explicitly check the offset. Also error out on other RLE
decoding errors.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 17:18:40 +01:00