Commit Graph

67115 Commits

Author SHA1 Message Date
Michael Niedermayer
8b0a063ba9 Merge commit 'a9f108bd78e842a47ade2f7c8b22a1764d01d4e6' into release/2.4
* commit 'a9f108bd78e842a47ade2f7c8b22a1764d01d4e6':
  ac3_parser: add required padding for GetBitContext buffer

See: fccd85b9f3
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-20 14:07:53 +02:00
Michael Niedermayer
80b1cc31b8 Merge commit '02477323b92aacdabe0a2d129eeb0c15fbd1ec9e' into release/2.4
* commit '02477323b92aacdabe0a2d129eeb0c15fbd1ec9e':
  aac_parser: add required padding for GetBitContext buffer

See: fccd85b9f3
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-20 14:07:20 +02:00
Anton Khirnov
c49b88b93b opusdec: properly handle mismatching configurations in multichannel streams
The substreams can have different resampling delays, so an additional
level of buffering is needed to synchronize them.

Bug-Id: 876
2015-08-01 20:54:11 +02:00
Michael Niedermayer
dfc147d24f MAINTAINERS: Remove myself as leader
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f2c58931e6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-31 18:35:31 +02:00
Luca Barbato
859ce02c98 h263: Always check both dimensions
CC: libav-stable@libav.org
Found-By: ago@gentoo.org
2015-07-22 13:05:35 +02:00
Janne Grunau
aa3ec219e1 imc: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
fate-imc.

CC: libav-stable@libav.org
2015-07-08 23:37:51 +02:00
Janne Grunau
a9f108bd78 ac3_parser: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
2015-07-08 23:37:51 +02:00
Janne Grunau
02477323b9 aac_parser: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
2015-07-08 23:37:51 +02:00
Michael Niedermayer
d9655621b3 avformat/swfdec: Do not error out on pixel format changes
Instead print an error and continue

Fixes Ticket4702

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a1204a1a4)
2015-07-08 12:46:58 +02:00
Paul B Mahol
1a4cb3b29c avcodec/exr: fix crash caused by merge
Various header informations need to be reset when decoding next frame.
Regression since: 95582b5c

Fixes ticket #4597.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit a03b69478b)
2015-06-19 11:25:52 +02:00
Michael Niedermayer
ff02eeafd8 avcodec/x86/h264_weight: handle weight1=128
Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e100966575)
2015-06-19 11:25:38 +02:00
Michael Niedermayer
bd28de1b4d avcodec/hevc_ps: Only discard overread VPS if a previous is available
Fixes Ticket4621

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57078e4d25)
2015-06-19 11:25:23 +02:00
Michael Niedermayer
57d094e3e3 avformat/mov: Mark avio context of decompressed atoms as seekable
Fixes Ticket4329

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8ce564ea28)
2015-06-19 11:25:06 +02:00
Michael Niedermayer
65d61a4bbb avfilter/x86/vf_hqdn3d: Fix register types
Fixes Ticket4301

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52fc3e372f)
2015-06-19 11:24:32 +02:00
Andreas Cadhalpun
1047c286fa libopenjpegenc: add NULL check for img before accessing it
If opj_image_create fails to allocate an image it returns NULL, which
causes a segmentation fault at 'img->x0 = 0'.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 03:22:17 +02:00
Michael Niedermayer
bf6ba4a032 swresample: Check the return value of resampler->init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 02915602d9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 01:31:20 +02:00
Michael Niedermayer
c6f343d7c4 Update for 2.4.10
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-02 01:12:40 +02:00
Andreas Cadhalpun
c646ee3da7 diracdec: check if reference could not be allocated
s->ref_pics[i] is later used as ref argument of interpolate_refplane,
where it is dereferenced.

If it is NULL, it causes a segmentation fault.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Andreas Cadhalpun
68c11b6654 diracdec: avoid overflow of bytes*8 in decode_lowdelay
If bytes is large enough, bytes*8 can overflow and become negative.

In that case 'bufsize -= bytes*8' causes bufsize to increase instead of
decrease.

This leads to a segmentation fault.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Andreas Cadhalpun
10429a5284 diracdec: prevent overflow in data_unit_size check
buf_idx + data_unit_size can overflow, causing the '> buf_size' check to
wrongly fail.

This causes a segmentation fault.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Michael Niedermayer
f9f1c50b41 avformat/matroskadec: Use tracks[k]->stream instead of s->streams[k]
The later is not correct

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Andreas Cadhalpun
84cc40cbe1 matroskadec: check s->streams[k] before using it
This fixes a segmentation fault.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Michael Niedermayer
43bfe0ada5 avcodec/ffv1dec: Check chroma shift parameters
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d43cd6b08e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
25b56dfa5c matroskadec: use uint64_t instead of int for index_scale
index_scale is set to matroska->time_scale of type uint64_t.

When index_scale is int, the assignment can overflow and e.g. result
in index_scale = 0. This causes a floating point exception due to the
division by index_scale.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
3126d6ee02 avcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and undefined behavior in fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 042260cde4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
35a0d4801f nutdec: fix illegal count check in decode_main_header
The existing check has two problems:
 1) i + count can overflow, so that the check '< 256' returns true.
 2) In the (i == 'N') case occurs a j-- so that the loop runs once more.

This can trigger the assertion 'nut->header_len[0] == 0' or cause
segmentation faults or infinite hangs.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
e0ef1b8c0b nutdec: check for negative frame rate in decode_info_header
A negative frame rate triggers an av_assert2 in av_rescale_rnd.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
723d2b0c5b ffmpeg: remove incorrect network deinit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e2877bdf38)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Maneesh Gupta
5260ba3e16 OpenCL: Avoid potential buffer overflow in cmdutils_opencl.c
The opt_opencl_bench function copied the device name using strcpy without checking if the source string was larger.
This patch fixes this by replacing the strcpy with av_strlcpy, with the string copy size capped to the destination buffer size.

Signed-off-by: Maneesh Gupta <maneesh.gupta@amd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cf234552b8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
427cf443ab apedec: set s->samples only when init_frame_decoder succeeded
Otherwise range_start_decoding is not necessarily run and thus
ctx->rc.range still 0 in range_dec_normalize leading to an infinite
loop.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Dave Yeo
d818b8338c OS/2:Makedef.cmd cleanup
Remove PROTMODE as it doesn't make sense for DLLs. Also fixes a warning with the OpenWatcom linker
Export symbols as names rather then ordinals for better compatibility for minor releases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
666295ebab avcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c720b9ce98)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
9ce3e804ff avformat/mov: Fix parsing short loci
Fixes Ticket4557

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
f073ed6651 avformat/mov: Print reason of loci parsing failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e4f0cfc8f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
b60895a13b avcodec/hevc: Fix typo in num_entry_point_offsets check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3051e7fa71)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
eac07625f9 avcodec/libtheoraenc: Check for av_malloc failure
Fixes CID1257799

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
55ee305beb avcodec/dcadec: Check active_bands
Fixes CID1297594 part2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
0719b1849c avcodec/dcadec: Check scale table index
Fixes CID1297594 part 1

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

Conflicts:

	libavcodec/dcadec.c
2015-06-01 23:25:21 +02:00
Michael Niedermayer
a593e8190f avcodec/sonic: More completely check sample_rate_index and channels
Fixes CID1271783

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
41cb921512 avcodec/sonic: check memory allocations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c131a9fead)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
7969c0c6f1 avcodec/smvjpegdec: check avcodec_decode_video2() return code
Fixes CID1271810

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
078ae8cbb7 avcodec/shorten: More complete pred_order check
Fixes CID1239055

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
49664f160e avcodec/shorten: Check skip_bytes()
Fixes CID1210526

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
deefa1580a avcodec/shorten: Fix code depending on signed overflow behavior
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2d15588124)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
b628942eef avcodec/proresdec2: Reset slice_count on deallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c4c6aea397)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
91767369a7 ffmpeg_opt: Fix -timestamp parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 107e4da476)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
6e7f434ad2 avcodec/dcadec: Check subsubframes
Fixes: CID1239152

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
c55a6bac6c avcodec/dcadec: Check nchans
Fixes CID1239110

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
wm4
fea9ed39e6 hevc: make avcodec_decode_video2() fail if get_format() fails
Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
62e4fe09ed avcodec/cavsdec: Check esc_code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 139e1c8009)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00