Andreas Rheinhardt
20f9727018
avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec
...
Up until now, codec.h contains both public and private parts
of AVCodec. This exposes the internals of AVCodec to users
and leads them into the temptation of actually using them
and forces us to forward-declare structures and types that
users can't use at all.
This commit changes this by adding a new structure FFCodec to
codec_internal.h that extends AVCodec, i.e. contains the public
AVCodec as first member; the private fields of AVCodec are moved
to this structure, leaving codec.h clean.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Michael Niedermayer
cb9f17cd28
tools/target_dec_fuzzer: Adjust threshold for TQI
...
Fixes: Timeout
Fixes: 44455/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATQI_fuzzer-6069950551293952
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
a13471fd04
tools/target_dec_fuzzer: Adjust threshold for DSICINVIDEO
...
Fixes: Timeout
Fixes: 44829/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-6190334340628480
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
9805a0004c
tools/target_dec_fuzzer: Fix build failure from channels API
...
Regression since 2f8ccca2fa
and surrounding commits
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
James Almer
2f8ccca2fa
tools/target_{bsf,dec}_fuzzer: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
James Almer
50e9e11316
tools: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Michael Niedermayer
31c4c99ff9
tools/target_dec_fuzzer: Adjust threshold for DFA
...
Fixes: Timeout
Fixes: 45351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-5768895011618816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
1c60ad469e
tools/target_dec_fuzzer: Adjust threshold for targa
...
Fixes: Timeout
Fixes: 44877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-4870505251864576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
James Almer
4f21a9ae6b
tools/target_bsf_fuzzer: simplify the loop feeding packets to the filter
...
And use a single AVPacket for the entire process.
This more closely follows the suggested API usage in the doxy.
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Michael Niedermayer
c900f2e42c
tools/target_dem_fuzzer: Check fmt before dereferencing
...
Fixes: NULL pointer dereference
Fixes: 44884/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4656748688965632
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Andreas Rheinhardt
321a3c244d
avutil/log: Don't include avutil.h
...
It has been included since af5f434f8c
for deprecation reasons, but removing it has been forgotten after
it had served is purpose. So remove it.
For convenience, include version.h instead as LIBAVUTIL_VERSION_INT
is supposed to be used when creating AVClasses.
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Michael Niedermayer
1372b30db2
tools/target_dem_fuzzer: Force interrupt for HLS
...
Fixes: Timeout
Fixes: 41580/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5059099224571904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
cd4ce3b862
tools/target_dem_fuzzer: Test interrupt callback
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
db3fd5ab31
tools/target_dec_fuzzer: Adjust threshold for prores
...
Fixes: Timeout
Fixes: 42072/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-4957999452520448
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
e901716daf
tools/target_dec_fuzzer: Adjust threshold for HQ_HQA
...
Fixes: Timeout
Fixes: 41120/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-6327761690558464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
cd95ac7e33
tools/target_dec_fuzzer: adjust threshold for gem
...
Fixes: Timeout
Fixes: 42035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GEM_fuzzer-5033604191748096
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
db27a35012
tools/target_dec_fuzzer: Adjust DXA threshold
...
Fixes: Timeout
Fixes: 40203/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXA_fuzzer-4587923496894464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
76c41a5bfe
tools/target_dec_fuzzer: Disable MB debug after a few iterations
...
This debug code can be quite slow on constructed streams
Fixes: Timeout
Fixes: 38907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6334628852531200
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
6bba9d960b
tools/target_dec_fuzzer: Adjust threshold for MXPEG
...
Fixes: Timeout
Fixes: 39813/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6010298067189760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
8e67cfe15b
tools/target_dec_fuzzer: Adjust threshold for WMV2
...
Fixes: Timeout
Fixes: 37737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-4923012999151616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Andreas Rheinhardt
1ea3650823
Replace all occurences of av_mallocz_array() by av_calloc()
...
They do the same.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Michael Niedermayer
a3ca06f9ea
tools/target_dec_fuzzer: Adjust VC1 threshold
...
Fixes: Timeout
Fixes: 38215/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-6375595299176448
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Nicolas George
8f92a1862a
tools/dvd2concat: generate VOBSUB extradata
...
The extradata contains the frame size of the subtitles images
and the palette.
3 years ago
Nicolas George
5b052c4bcb
tools/dvd2concat: add support for chapters
3 years ago
Nicolas George
1a0aff8ca5
tools/dvd2concat: specify stream_codec for subtitles
...
Avoid requiring a huge probe size and analyze duration.
3 years ago
Nicolas George
86b2a86169
tools/dvd2concat: include language metadata
3 years ago
Michael Niedermayer
8f4c36553c
tools/target_dec_fuzzer: Adjust threshold for WMV3
...
Fixes: Timeout clearing images
Fixes: 37726/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-4604669570187264
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Andreas Rheinhardt
b2793a9462
tools/target_bsf_fuzzer: Make it const-correct
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
a1292895cb
configure: Remove null_bsf dependency
...
Unneeded since c96904f525
(a bsf-list with zero bsfs is used since that commit).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Nicolas George
252128561e
tools/dvd2concat: use option keyword
...
subfile,,start,X,end,Y,,: is ugly and will be gone some day.
3 years ago
Nicolas George
6d82d894ee
tools/dvd2concat: document that -protocol_whitelist is needed
3 years ago
Anton Khirnov
5fdb5ed613
FATE: add a test for sliced scaling
3 years ago
Anton Khirnov
94170e0411
tools/venc_data_dump: factor out demux/decode code
...
It can be shared with other simple demux/decode tools.
3 years ago
Michael Niedermayer
c42f277903
tools/target_dec_fuzzer: check max samples in flush loop
...
Fixes: Timeout
Fixes: 36020/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-4774629855068160
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
f0ed8de1d6
tools/target_dec_fuzzer: Adjust threshold for VP6F
...
Fixes: Timeout
Fixes: 34791/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP6F_fuzzer-4571038838030336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
46e8778300
tools/target_dec_fuzzer: Adjust the threshold for VP5
...
Fixes: Timeout
Fixes: 35793/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP5_fuzzer-6492854393372672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
cce928e941
tools/target_dec_fuzzer: Adjust the threshold for VP3
...
Fixes: Timeout
Fixes: 35855/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4851183540895744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
54b798638e
tools/target_dec_fuzzer: Fix extradata duplication
...
Fixes: out of array access
Fixes: 36340/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5872546875572224.fuzz
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Andreas Rheinhardt
c253b180cb
tools/graph2dot: Don't use sizeof(AVFilterGraph), check allocation
...
Use avfilter_graph_alloc() instead of av_mallocz(sizeof(AVFilterGraph))
to allocate an AVFilterGraph; this also properly allocates the graph's
internal. The current code just happened to work because it did not
make any use of said internal.
Also check the allocation; this fixes Coverity #1292528 .
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Michael Niedermayer
69aa2488fc
tools/target_dec_fuzzer: Adjust threshold for libvorbis
...
Fixes: Timeout
Fixes: 33513/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVORBIS_fuzzer-6481006635909120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Andreas Rheinhardt
4608f7cc6a
Remove unnecessary mem.h inclusions
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
69f120ead7
avcodec/avcodec: Don't include cpu.h
...
It is not used here at all; instead, add it where it is used without
including it or any of the arch-specific CPU headers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
57b5ec6ba7
avcodec/avcodec: Stop including bsf.h in avcodec.h
...
Also include bsf.h directly wherever it is used.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Michael Niedermayer
748c3fa52a
tools/target_dec_fuzzer: Fuzz FF_DEBUG_*
...
This should increase coverage
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
9fa30cf855
tools/target_dec_fuzzer: Fuzz AV_CODEC_FLAG2_EXPORT_MVS
...
This should increase coverage
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
a0fd56f55e
tools/target_dec_fuzzer: Set extradata for the parser
...
This should improve coverage
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
9c8df64a70
tools/target_dec_fuzzer: Fuzz skip_frame
...
Should allow coverage of related code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
29c95765e8
tools/target_dec_fuzzer: move maximum variables into function
...
This fixes an issue when multiple cases are fuzzed in a single run and
the limits are adjusted by more than the iteration limit. In that case
the adjusted limit leaked back into the global limit causing the
fuzzer to become ineffective after several iterations, MSS2 was
affected by this for example.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
0b3cdd7cc2
tools/cws2fws: Check read() for failure
...
Fixes: CID1452579 Argument cannot be negative
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
532c65f751
tools/target_dec_fuzzer: Adjust threshold for theora
...
Fixes: Timeout
Fixes: 33916/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-4620863119949824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago