Commit Graph

95504 Commits

Author SHA1 Message Date
Paul B Mahol
f3746d31f9 avutil/opt: add AV_OPT_FLAG_RUNTIME_PARAM flag 2019-10-14 11:28:54 +02:00
Paul B Mahol
036fff7e43 avfilter/vf_geq: reindent 2019-10-14 10:56:20 +02:00
Paul B Mahol
8a0d45a92e avfilter/vf_geq: allow user to set interpolation method 2019-10-14 10:55:51 +02:00
Paul B Mahol
996ff3fe86 avfilter/vf_edgedetect: fix coverity issue 2019-10-14 10:52:27 +02:00
Andriy Gelman
634529c40d avformat/chromaprint: improve logging message
Setting silence_threshold requires that -algorithm is set to 3.
2019-10-14 12:29:40 +05:30
Andriy Gelman
1108bd5173 avformat/chromaprint: Fix fp_format option
The fp_format option was incorrectly declared,
so it could not be set via string constants.
2019-10-14 12:27:34 +05:30
Michael Niedermayer
c8813b1a98 avfilter/vf_geq: Use av_clipd() instead of av_clipf()
With floats we cannot represent all 32bit integer dimensions

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-14 00:48:44 +02:00
Andreas Rheinhardt
5056eb3511 avformat/Makefile: Fix aiffdec replaygain dependency
Forgotten in 6390f52a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-14 00:48:44 +02:00
gxw
21d19f49b7 avcodec/mips: Fixed four warnings in vc1dsp
Change the stride argument to ptrdiff_t in the following functions:
ff_put_no_rnd_vc1_chroma_mc8_mmi, ff_put_no_rnd_vc1_chroma_mc4_mmi,
ff_avg_no_rnd_vc1_chroma_mc8_mmi, ff_avg_no_rnd_vc1_chroma_mc4_mmi.

Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-14 00:48:44 +02:00
Michael Niedermayer
e418b315dd avcodec/wmaprodec: Check that the streams channels do not exceed the overall channels
Fixes: NULL pointer dereference
Fixes: 18075/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5708262036471808
Fixes: 18087/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5740627634946048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-14 00:48:44 +02:00
Paul B Mahol
e835a9d302 avfilter/vf_libvmaf: fix filtering of >8 bit data
This is what reference does.
2019-10-13 23:43:42 +02:00
Paul B Mahol
19587c9332 avfilter/vf_lenscorrection: fix division by zero
Fixes #8265
2019-10-13 23:29:39 +02:00
Paul B Mahol
07050d7bdc avfilter/vf_fieldorder: fix heap-buffer overflow
Fixes #8264
2019-10-13 23:10:16 +02:00
Paul B Mahol
99f8d32129 avfilter/vf_convolution: fix undefined behaviour
Fixes #8263
2019-10-13 18:37:16 +02:00
Paul B Mahol
365083556e avfilter/vf_bm3d: fix possible infinite loop 2019-10-13 18:16:19 +02:00
Paul B Mahol
0749082eb9 avfilter/vf_bm3d: fix heap-buffer overflows
Fixes #8262
2019-10-13 18:10:38 +02:00
Paul B Mahol
ccf4ab8c9a avfilter/vf_edgedetect: check if height is big enough
Fixes #8260
2019-10-13 17:24:09 +02:00
Paul B Mahol
4f4334bcbc avfilter/vf_waveform: fix typos which caused crash 2019-10-13 11:51:11 +02:00
Paul B Mahol
a7fd127970 avfilter/vf_colorconstancy: fix overreads in gauss array
Fixes #8250
2019-10-12 19:07:51 +02:00
Paul B Mahol
e923e6205e avfilter/vf_waveform: add yflat filter 2019-10-12 18:46:13 +02:00
Paul B Mahol
33fd82ae9e avfilter/vf_waveform: allow different cb for new modes 2019-10-12 17:57:23 +02:00
Paul B Mahol
42974eb13a avfilter/vf_waveform: add invert graticule 2019-10-12 17:44:52 +02:00
Paul B Mahol
ecc1675368 avfilter/vf_waveform: add graticule enum 2019-10-12 16:02:34 +02:00
Matthieu Bouron
1921f866ec avformat/mov: parse sdtp atom and set the pkt disposable flag accordingly
Allows the creation of the sdtp atom while remuxing MP4 to MP4. This
atom is required by Apple devices (iPhone, Apple TV) in order to accept
2160p medias.
2019-10-12 14:36:15 +02:00
Andreas Rheinhardt
def04022f4 avcodec/zmbvenc: Correct offset in buffer
zmbvenc allocates a buffer for a picture with padding on all four sides:
The stride is choosen so large that it already contains padding on the
right; the height also includes padding rows. The padding on the right
of each row is also reused as padding for the left of the next row. So
one still needs to add padding on the left for the first row. This is done
by offsetting the actual pointer used to access the picture from the
pointer returned by av_mallocz and the formula for this offset was
wrong, because it ignored that a pixel can take more than one byte when
calculating the offset resulting from the left padding of the first row.

This fixes accesses outside of the allocated buffer that were reported
in tickets #7980 and #7994. No writes were ever attempted outside of
the buffer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-12 13:39:45 +02:00
Andreas Rheinhardt
223a2c2a60 fftools/ffmpeg: Improve streamcopy
do_streamcopy() has a packet that gets zero-initialized first, then gets
initialized via av_init_packet() after which some of its fields are
oerwritten again with the actually desired values (unless it's EOF): The
side data is copied into the packet with av_copy_packet_side_data() and
if the source packet is refcounted, the packet will get a new reference
to the source packet's data. Furthermore, the flags are copied and the
timestamp related fields are overwritten with new values.

This commit replaces this by using av_packet_ref() to both initialize
the packet as well as populate its fields with the right values (unless
it's EOF again in which case the packet will still be initialized). The
differences to the current approach are as follows:
a) There is no call to a deprecated function (av_copy_packet_side_data())
any more.
b) Several fields that weren't copied before are now copied from the source
packet to the new packet (e.g. pos). Some of them (the timestamp related
fields) may be immediately overwritten again and some don't seem to be
used at all (e.g. pos), but in return using av_packet_ref() allows to forgo
the initializations.
c) There was no check for whether copying side data fails or not. This
has been changed: Now the program is exited in this case.

Using av_packet_ref() does not lead to unnecessary copying of data,
because the source packets are already always refcounted (they originate
from av_read_frame()).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-12 13:39:45 +02:00
Michael Niedermayer
2c7975fe6f avcodec/qdmc: Check input space in qdmc_get_vlc()
Fixes: Timeout (125sec -> 0.4sec)
Fixes: 18059/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDMC_fuzzer-5656195825664000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-12 13:21:50 +02:00
Moritz Barsnick
f76a899abc avformat/mpjpegdec: ensure seekback for latest chunk
Not only the first, but each latest chunk must be cached to allow
seekback after finding the mime boundary.

Fixes trac #5023 and #5921.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-12 13:21:50 +02:00
Moritz Barsnick
1ea44a55fe avformat/mpjpegdec: fix strict boundary search string
According to RFC1341, the multipart boundary indicated by the
Content-Type header must be prepended by CRLF + "--", and followed
by CRLF. In the case of strict MIME header boundary handling, the
"--" was forgotten to add.

Fixes trac #7921.

A side effect is that this coincidentally breaks enforcement of
strict MIME headers against servers running motion < 3.4.1, where
the boundary announcement in the HTTP headers incorrectly used the
prefix "--", which exactly matched this bug's behavior.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-12 13:21:50 +02:00
Moritz Barsnick
a3846fe69b avformat/mpjpegdec: fix finding multipart boundary parameter
The string matching function's return value was evaluated incorrectly.

Fixes trac #7920.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-12 13:21:50 +02:00
Paul B Mahol
961d6493e8 avutil/eval: add sgn() 2019-10-12 10:13:29 +02:00
James Almer
72704cbff4 avformat/dv: free all allocated structs on dv_read_header failure
Also propagate proper AVERROR codes while at it.

Fixes ticket #8230.

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-11 20:38:36 -03:00
OvchinnikovDmitrii
27da30addd libavcodec/amfenc_h264.c: Changed loop filter flag default value.
The value has been changed to match the recommended(by AMF Encoder team)
2019-10-11 20:30:46 -03:00
Paul B Mahol
71d9ae11a5 avfilter/vf_signalstats: fix stack buffer overflow
Fixes #8249
2019-10-11 13:32:24 +02:00
Paul B Mahol
0e68e8c93f avfilter/vf_w3fdif: deny processing small videos
Fixes #8243
2019-10-11 12:55:13 +02:00
Paul B Mahol
0b56723874 avfilter/vf_bitplanenoise: fix overreads
Fixes #8244
2019-10-11 12:42:13 +02:00
Paul B Mahol
b62f7e243c avfilter/vf_deflicker: fix invalid access
Fixes #8253
2019-10-11 12:23:26 +02:00
Paul B Mahol
7ad69a73f3 avfilter/vf_waveform: better guard against picking wrong pixel format
Fixes #8252
2019-10-11 12:07:54 +02:00
Paul B Mahol
e787f8fd7e avfilter/vf_neighbor: check if width is 1
Fixes #8242
2019-10-11 11:19:00 +02:00
Paul B Mahol
1331e00179 avfilter/vf_floodfill: finish early if source and destination fill matches
Fixes #8236
2019-10-10 21:52:51 +02:00
Paul B Mahol
b67af536be avfilter/vf_random: fix crash
Fixes #8235.
2019-10-10 21:04:56 +02:00
Michael Niedermayer
f6df99dba1 avcodec/dstdec: Check for input exhaustion
Fixes: Timeout (239sec -> 16sec)
Fixes: 17811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5715508149616640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-10 14:34:20 +02:00
Michael Niedermayer
a5d29812ec avcodec/wmaprodec: Fix cleanup on error
Fixes: memleaks
Fixes: 18023/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-5642535011090432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-10 14:34:20 +02:00
Michael Niedermayer
5de19160a3 avcodec/pcm: Check bits_per_coded_sample
Fixes: shift exponent -2 is negative
Fixes: 17736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F16LE_fuzzer-5742815929171968
Fixes: 17998/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F24LE_fuzzer-5716980383875072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-10 14:34:20 +02:00
Limin Wang
6d18b62db9 avcodec/magicyuv: remove duplicate code
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-10 14:34:20 +02:00
Michael Niedermayer
b3c25263d1 avcodec/scpr: Check minimum size of type 17
Improves: Timeout (85sec -> 46sec)
Improves: 17644/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5715704283660288

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-10 14:34:19 +02:00
Michael Niedermayer
080819b3b4 avcodec/exr: Allow duplicate use of channel indexes
Fixes: Ticket #8203

Reported-by: durandal_1707
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-10 14:34:19 +02:00
Michael Niedermayer
4a3303d520 avcodec/fitsdec: Fail on 0 naxisn
Fixes: Timeout (100+ sec -> 23ms)
Fixes: 17769/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-5678314672357376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-10 14:34:19 +02:00
Steven Liu
a76a516e76 avfilter/vf_delogo: make the interp value compute method simple
because the interp >= 0UL comparison of an unsigned value is always true
fix CID: 1454642

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-10 10:27:00 +08:00
Steven Liu
aea82dfe22 avfilter/vf_delogo: add auto set the area inside of the frame
when the area outside of the frame, then use expr should
give user warning message and auto set to the area inside of the frame.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-10 10:26:57 +08:00