Commit Graph

100933 Commits

Author SHA1 Message Date
Andreas Rheinhardt
ba874ad904 avfilter/ebur128: Remove unused functions
Also make a function only used here static.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
a40c158eda fftools/ffmpeg_filter: Remove choose_sample_fmt
Unused since 6b35a83214.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Andreas Rheinhardt
bb072a0369 avformat/rtmppkt: Only compile ff_rtmp_packet_dump if defined(DEBUG)
It is only used in this case.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Andreas Rheinhardt
7b43646e18 avformat/avio: Remove ffurl_open
It is only used in commented-out (and nonworking) code in async.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Andreas Rheinhardt
5cad6c6e85 avformat/rtmpproto: Only include RTMP protocols that are enabled
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Andreas Rheinhardt
82d5316c57 avformat/rtmppkt: Remove ff_amf_read_bool
Added in 50468f93e3, but never used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:29 +01:00
Mark Thompson
ac05413dfb vc2enc: Add missing static to local variables 2021-02-02 22:34:55 +00:00
Paul B Mahol
68b5236eae avfilter/vf_colorlevels: call execute once per frame 2021-02-02 17:53:29 +01:00
Paul B Mahol
7ee3a5594b avfilter/vf_colorlevels: no need to use double for coeff 2021-02-02 17:53:29 +01:00
Paul B Mahol
62e24a5d80 avfilter/vf_colorlevels: beautify define 2021-02-02 17:53:29 +01:00
Paul B Mahol
a7e826b9e1 avfilter/vf_colorlevels: typedef ThreadData struct 2021-02-02 17:53:29 +01:00
Paul B Mahol
85bdf18917 avcodec: add PFM image encoder 2021-02-02 14:29:33 +01:00
Paul B Mahol
090f31f813 avfilter: add colorcontrast filter 2021-02-02 14:27:06 +01:00
Limin Wang
38caef3876 avformat/hlsenc: use AV_OPT_TYPE_DURATION
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-02 20:55:50 +08:00
Michael Niedermayer
3c41d0bfd6 avformat/rmdec: Fix codecdata_length overflow check
Fixes: signed integer overflow: 2147483647 + 64 cannot be represented in type 'int'
Fixes: 28509/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-6310969680723968

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-02 13:12:12 +01:00
Michael Niedermayer
57f7e5caa3 avcodec/simple_idct: Fix undefined integer overflow in idct4row()
Fixes: signed integer overflow: -1498310196 - 902891776 cannot be represented in type 'int'
Fixes: 28445/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5075163389493248

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-02 13:12:12 +01:00
Michael Niedermayer
0af0a80cef avformat/wavdec: Check block_align vs. channels before combining them
Fixes: signed integer overflow: 65535 * 65312 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6606935226974208

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-02 13:12:12 +01:00
Michael Niedermayer
fd61b42b4c avformat/tta: Use 64bit intermediate for index
Fixes: signed integer overflow: 42032 * 51092 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-6679539648430080

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-02 13:12:12 +01:00
Michael Niedermayer
b0588b73da avformat/soxdec: Check channels to be positive
Fixes: signed integer overflow: 32 * -1795162112 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SOX_fuzzer-6724151473340416

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-02 13:12:12 +01:00
Michael Niedermayer
f54aab94a3 avformat/smacker: Check for too small pts_inc
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SMACKER_fuzzer-6705429132476416

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-02 13:12:12 +01:00
Michael Niedermayer
92b1949191 avformat/sccdec: Use larger intermediate for ts/next_ts computation
Fixes: signed integer overflow: 92237203 * 33 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SCC_fuzzer-6603769487949824

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-02 13:12:12 +01:00
Michael Niedermayer
2a0d17c4d1 avcodec/cri: Use ff_set_dimensions()
Fixes: out of memory
Fixes: 29985/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6424425392111616

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-02 13:12:12 +01:00
Andreas Rheinhardt
e742bf3421 avcodec/aacps_fixed_tablegen: Don't include config.h
It is only valid for the target, not the host and therefore it must not
be included when building the tables when hardcoded tables are enabled.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 01:47:01 +01:00
Tomas Härdin
ff0618b5c4 avformat/mxf: Establish register of local tags
Tags can be marked "not used" upfront, saving some space in the primer.
av_asserts0() is used to enforce that only tags that are in the primer can actually be written.
Sharing of MasteringDisplay ULs is now done via macros.
2021-02-01 23:52:55 +01:00
Michael Niedermayer
5441699f83 avformat/sbgdec: Use av_sat_add64() in str_to_time()
Fixes: signed integer overflow: 7279992792120000000 + 4611686018427387904 cannot be represented in type 'long long'
Fixes: 29744/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6434060249464832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-01 19:03:53 +01:00
Piotr Uracz
7ceceee8b6 avcodec/aac_ac3_parser: fix channel information parsing in case decoder is disabled
Fixes #7372
2021-02-01 18:02:11 +01:00
Andreas Rheinhardt
ad2cc0e2f4 avformat/rtpdec: Avoid allocations of small dynamic buffers
Besides avoiding allocations this also fixes a design defect of
ff_rtp_send_punch_packets: It did not return an error in case of
these allocations failed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-31 21:26:44 +01:00
Paul B Mahol
459c6e8ab3 avfilter/vf_vibrance: add packed formats support 2021-01-31 20:55:23 +01:00
Paul B Mahol
98b0c0e44f avfilter/vf_colortemperature: add packed formats support 2021-01-31 20:55:23 +01:00
Paul B Mahol
aa8cf8fdee avfilter/vf_colortemperature: use macro for identical code 2021-01-31 20:55:23 +01:00
Michael Niedermayer
6de039823c avcodec/cscd: Check output len in zlib as in lzo
Fixes: Timeout (>10sec -> 134ms)
Fixes: 27245/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CSCD_fuzzer-575318210772992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-31 14:37:07 +01:00
Michael Niedermayer
869fe41d10 avcodec/vp3: Check input amount in theora_decode_header()
Fixes: Timeout
Fixes: 29226/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-6195092572471296

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-01-31 14:37:07 +01:00
Michael Niedermayer
d7594ee751 avformat/wavdec: Check avio_get_str16le() for failure
Fixes: out of array access
Fixes: 29195/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5037853281222656

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-01-31 14:37:07 +01:00
Paul B Mahol
47be08640c avcodec/pnm: disable check for PFM as it is not needed 2021-01-31 14:06:07 +01:00
Gyan Doshi
d16b0a4bf0 ffmpeg: remove dead code for -vol
It is applied via configure_input_audio_filter()
2021-01-31 17:21:32 +05:30
Gyan Doshi
6c92557756 doc/ffmpeg: document apad option 2021-01-31 10:02:18 +05:30
Paul B Mahol
54de7dc372 avfilter/af_acrusher: add commands support 2021-01-30 23:53:38 +01:00
Paul B Mahol
633e344d96 avfilter/vf_lagfun: add support for commands 2021-01-30 17:28:26 +01:00
Paul B Mahol
f0dd5c00cb avfilter/vf_weave: add slice threading support 2021-01-30 17:00:35 +01:00
Paul B Mahol
0959f95a8e avfilter/vf_blackdetect: add slice threading support 2021-01-30 16:08:26 +01:00
Andreas Rheinhardt
44e27d937d avcodec/dolby_e: Avoid duplicating sample rate table
Set the sample rate when parsing the header instead and only copy the
value in the decoder and the parser.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-30 05:14:45 +01:00
Andreas Rheinhardt
7c27513d04 avcodec/dolby_e: Avoid code duplication when converting input
convert_input, a nontrivial auxiliary function used by both the general
parsing code as well as the decoder itself, has been duplicated in
c7016e35a624a75bb5b82bee932ddfe28d013b3f; this commit removes said
duplication.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-30 05:14:45 +01:00
Andreas Rheinhardt
8cbff41583 avcodec/dolby_e_parse: Merge ff_dolby_e_parse_init/header
These two functions are always called after another; after all, what
ff_dolby_e_parse_init does is obviously part of parsing the frame header.

Also move the DolbyEHeaderInfo into DBEContext so that parsing the frame
header only needs one struct (both users used a DBEContext immediately
followed by a separate DolbyEHeaderInfo).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-30 05:14:45 +01:00
Andreas Rheinhardt
fa3ab43fec avcodec/dolby_e_parser: Remove unused ParseContext
Parsers are not forced to use a ParseContext and the other stuff from
parser.h which is just designed to help parsers recombining frames. But
this parser does not do this at all, i.e. the ParseContext is unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-30 05:14:45 +01:00
Paul B Mahol
d43a27ab6f avfilter/vf_pseudocolor: allow more advanced presets 2021-01-29 23:42:24 +01:00
Paul B Mahol
50dd020f04 avfilter/vf_lut3d: add prism interpolation 2021-01-29 23:41:07 +01:00
Paul B Mahol
26a53519dc avfilter/vf_lut3d: add pyramid interpolation 2021-01-29 23:41:07 +01:00
Michael Niedermayer
9725d07a17 avformat/flvdec: Check for EOF in amf_skip_tag()
Fixes: Timeout
Fixes: 29070/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5650106766458880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-29 19:36:46 +01:00
Michael Niedermayer
06e5c79194 avformat/asfdec_o: Check lang_idx
Fixes: index 26981 out of bounds for type 'ASFStreamData [128]'
Fixes: 27334/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-6197611002068992

Alternatively the array could be increased in size or the cases not fitting be ignored

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-29 19:36:46 +01:00
Michael Niedermayer
8af299acde avformat/aiffdec: Check size before subtraction in get_aiff_header()
Fixes: Infinite loop
Fixes: 27235/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5761398380167168

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-29 19:36:46 +01:00