Commit Graph

101094 Commits

Author SHA1 Message Date
Paul B Mahol 129978af6b avfilter/af_arnndn: skip array extra entries by looking for new line 2021-02-10 14:15:42 +01:00
Michael Niedermayer 2014b01352 avformat/samidec: Sanity check pts
Fixes: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long'
Fixes: 29743/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-5499256859394048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:30 +01:00
Michael Niedermayer 2a2082a41b avcodec/jpeg2000dec: Check atom_size in jp2_find_codestream()
Fixes: Infinite loop
Fixes: 29722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6412228041506816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:30 +01:00
Michael Niedermayer 3a24000e72 avcodec/mobiclip: Bound planar prediction value
Fixes: signed integer overflow: 2 * 1073741952 cannot be represented in type 'int'
Fixes: 26765/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-6594926936326144
Fixes: 29663/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5169789012148224

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:30 +01:00
Michael Niedermayer a0ceb0cdd4 avformat/avidec: Use 64bit in get_duration()
Fixes: signed integer overflow: 2147483424 + 8224 cannot be represented in type 'int'
Fixes: 29619/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5191424373030912

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:30 +01:00
Michael Niedermayer 658f0606cb avformat/mov: Check for duplicate st3d
Fixes: memleak
Fixes: 29585/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6594188688490496

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:30 +01:00
Michael Niedermayer 6c64351bb1 avformat/mvdec: Check for EOF in read_index()
Fixes: Timeout
Fixes: 29550/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5094307193290752

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Michael Niedermayer 980900d991 avcodec/jpeglsdec: Fix k=16 in ls_get_code_regular()
Fixes: Timeout
Fixes: left shift of 33046 by 16 places cannot be represented in type 'int'
Fixes: 29258/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-4889231489105920
Fixes: 29515/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-6161940391002112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Michael Niedermayer 25f240fcb3 avformat/id3v2: Check the return from avio_get_str()
Fixes: out of array access
Fixes: 29446/clusterfuzz-testcase-minimized-ffmpeg_dem_AAC_fuzzer-5096222622875648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Michael Niedermayer 7a23952614 avutil/mathematics: Fix undefined negation in av_compare_ts()
Fixes: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itself
Fixes: 29437/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4748510022991872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Michael Niedermayer 1bda9bb68a libavutil/common: Add FFABS64U()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Michael Niedermayer 0791a515d3 avcodec/hevc_sei: Check payload size in decode_nal_sei_message()
Fixes: out of array access
Fixes: 29392/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4821602850177024.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Michael Niedermayer 8574fcbfc7 libavutil/eval: Remove CONFIG_TRAPV special handling
Fixes: division by zero
Fixes: 29555/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVO_fuzzer-5149951447400448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-10 12:28:29 +01:00
Paul B Mahol aa8adc9206 avfilter/vf_datascope: add commands support 2021-02-10 11:28:47 +01:00
Bohan Li 82aab8a4ee avcodec/libaomenc: add support for setting arbitrary libaom options
A new key & value API lets us gain access to newly added parameters
without adding explicit support for them in our wrapper. Add an
option utilizing this functionality in a similar manner to other
encoder libraries' wrappers.

Signed-off-by: Bohan Li <bohanli@google.com>
2021-02-10 11:52:46 +02:00
Paul B Mahol e0fd35d867 avformat/fitsenc: write DATAMIN/DATAMAX to encoded output
There is no point in doing normalization when such files are decoded.

Update fate test with new results.
2021-02-10 00:03:38 +01:00
Paul B Mahol 4aef642cfd avcodec/fitsdec: properly initialize header->data_max 2021-02-10 00:03:38 +01:00
Paul B Mahol 199301a03a avfilter/af_arnndn: make model opening errors more verbose
Also return proper error code.
2021-02-09 23:56:11 +01:00
Michael Niedermayer 2c60eb6c5a avformat/mov: factor size out of probe code
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-09 19:37:27 +01:00
Michael Niedermayer 5552ceaf56 avformat/wtvdec: Check len in parse_chunks() to avoid overflow
Fixes: signed integer overflow: 2147483647 + 7 cannot be represented in type 'int'
Fixes: 30084/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6192261941559296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-09 19:37:27 +01:00
Michael Niedermayer 69754e07f5 avformat/wtvdec: Check for EOF before potentially reseting the eof state
Fixes: infinite loop
Fixes: 28042/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6311288967528448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-09 19:37:27 +01:00
Michael Niedermayer 2c8cd4490a avformat/asfdec_f: Add an additional check for the extradata size
Fixes: OOM
Fixes: 30066/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-6182309126602752

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>
2021-02-09 19:37:27 +01:00
Michael Niedermayer 7e5034f97e avformat/3dostr: Check sample_rate
Fixes: signed integer overflow: -1268324762623155200 * 8 cannot be represented in type 'long'
Fixes: 30123/clusterfuzz-testcase-minimized-ffmpeg_dem_THREEDOSTR_fuzzer-6710765123928064

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>
2021-02-09 19:37:27 +01:00
Paul B Mahol d7cb8c51f0 avfilter/vf_curves: add commands support 2021-02-09 18:20:15 +01:00
Paul B Mahol b6327612ab avcodec: add cri parser 2021-02-09 15:01:34 +01:00
Paul B Mahol 483cf7a183 avcodec/argo: fix linesize for RLE? in PAL8 mode 2021-02-09 14:18:46 +01:00
Paul B Mahol cfcc36240f avfilter/vf_framepack: add >8 format support 2021-02-09 12:29:04 +01:00
Paul B Mahol 73ff84c3d4 avfilter/vf_swaprect: add support for commands 2021-02-09 11:39:26 +01:00
Paul B Mahol ca042675ee avfilter/vf_maskfun: add support for commands 2021-02-09 11:24:31 +01:00
Paul B Mahol 8e027ca817 avfilter/vf_zscale: switch verbose log to trace
Not needed in verbose mode.
2021-02-09 10:37:42 +01:00
Paul B Mahol a00ff56321 avfilter/vf_lut: add support for commands
While here remove excessive log and uninit() call in negate_init().
2021-02-08 16:37:23 +01:00
Paul B Mahol dd01165f19 avfilter/vf_deband: add support for commands 2021-02-08 16:10:51 +01:00
Paul B Mahol 178a0d6f7d avfilter/vf_deband: avoid doubles 2021-02-08 16:10:51 +01:00
Andreas Rheinhardt 8d21eccd26 avcodec/g722enc: Validate parameters before using them
In case trellis is outside of 0..23, an invalid shift and/or a signed
integer overflow happens; furthermore, it can lead to the request to
allocate nonsense amounts of memory. So validate first.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-08 13:27:22 +01:00
Paul B Mahol a773455c4f avfilter/vf_thumbnail: add support for rest of packed rgb formats 2021-02-08 13:01:28 +01:00
Paul B Mahol 3b65c848a6 avfilter/vf_thumbnail: add support for YUV and GBRP formats 2021-02-08 12:45:49 +01:00
Anton Khirnov cc4feff861 vf_pp: remove unnecessary free
ff_qp_table_extract() frees the table on failure.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-08 11:06:29 +01:00
Anton Khirnov fffc35b870 mjpegdec: stop setting the QP table
MJPEG does not have a single quantiser scale, so this does not fit into
the intended API use.

This removes the last use of the long-deprecated QP table API.
2021-02-08 11:06:10 +01:00
Paul B Mahol 89f78dd0fe avfilter/vf_lut3d: lut3d, haldclut: add support for commands 2021-02-08 00:55:07 +01:00
Paul B Mahol 5f592136eb avfilter/vf_lut2: add support for commands 2021-02-07 22:41:49 +01:00
Paul B Mahol 629dd8efb5 avfilter/vf_extractplanes: add float formats support 2021-02-07 21:45:26 +01:00
Marton Balint cae57cae1f avformat/libsrt: fix race condition with libsrt_network_wait_fd and epoll
The way SRT's async / epoll-based IO works is that the event status is stored
in the epoll containers. That is, if an event occurs on an SRT socket, and that
SRT socket isn't part of any epoll container, then that event is lost. If we
later add that socket to an epoll container, we still won't receive the event
even if it wasn't serviced.

Therefore we create the epoll and put the fd into it right after the connection
is established.

See http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2021-January/275334.html

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-07 19:42:22 +01:00
Marton Balint 5cf01ed5cd avformat/libsrt: fix or simplify some function return values
Sometimes there was a confusion between srt_*() function return values and
libavformat-style return values.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-07 19:42:22 +01:00
Marton Balint d4e4ffd348 avformat/libsrt: close listen fd immediately after accept
There is no reason to keep it open.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-07 19:42:22 +01:00
Paul B Mahol bd5226704a avfilter: add colorize filter 2021-02-07 11:48:28 +01:00
Andreas Rheinhardt 134193a2ff avcodec/ac3enc: Share options and defaults
Both AC-3 encoder share the same options, yet they are nevertheless
duplicated in the binary; and the options applying to the EAC-3 encoder
are a proper subset of the options for the AC-3 encoders, so that it can
use the same options as the former by putting the options specific to
AC-3 at the front. This commit implements this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:30:14 +01:00
Andreas Rheinhardt bdd55e1dd8 avcodec/Makefile: Remove dependency for nonexistent files
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:29:19 +01:00
Andreas Rheinhardt 698a4b22d0 avcodec/aacdec_fixed: Move fixed-point sinewin tables to its only user
The fixed-point AAC decoder is the only user of the fixed-point sinewin
tables from sinewin; and it only uses a few of them (about 10% when
counting by size). This means that guarding initializing these tables by
an AVOnce (as done in 3719122065) is
unnecessary for them. Furthermore the array of pointers to the
individual arrays is also unneeded.

Therefore this commit moves these tables directly into aacdec_fixed.c;
this is done by ridding the original sinewin.h and sinewin_tablegen.h
headers completely of any fixed-point code at the cost of a bit of
duplicated code (the alternative is an ugly ifdef-mess).

This saves about 58KB from the binary when using hardcoded tables (as
these tables are hardcoded in this scenario); when not using hardcoded
tables, most of these savings only affect the .bss segment, but the rest
(< 1KB) contains relocations (i.e. savings in .data.rel.ro).

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:28:29 +01:00
Andreas Rheinhardt 3044d0efee ffbuild/common: Make deletion of templates possible
If a target to be built includes a template file, the target's .d file
includes the template file as a prerequisite; if the code were changed so
that the template file no longer exists, one would get an error from
make that it has no rule for the template file target. Therefore add a
dummy rule for template files to make deleting them possible.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 09:45:04 +01:00
Paul B Mahol a52b9464e4 doc/general_contents: add few more entries
Also extend description of some entries.
2021-02-07 00:01:12 +01:00