1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

103726 Commits

Author SHA1 Message Date
Michael Niedermayer
71b4d16bca avformat/dhav: do not use zero fps
Fixes: assertion failure
Fixes: 38332/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-4522405595316224

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-09-19 20:12:32 +02:00
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>
2021-09-19 20:12:32 +02:00
Paul B Mahol
0b150e4f61 avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale 2021-09-19 13:49:55 +02:00
Paul B Mahol
7747ab7ded avfilter/avf_avectorscope: add support for commands 2021-09-19 13:49:55 +02:00
Paul B Mahol
99d71c28d4 avfilter/avf_avectorscope: add slice threading for fade function 2021-09-19 13:14:11 +02:00
Paul B Mahol
4f7f046683 avfilter/avf_avectorscope: add ultra fast path when slow fading is disabled 2021-09-19 12:34:45 +02:00
Andreas Rheinhardt
d8ca8bec26 avfilter/vf_hflip: Don't call av_pix_fmt_desc_get() twice
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 05:18:51 +02:00
Andreas Rheinhardt
73a59ed1cb avfilter/vf_zscale: Use init instead of init_dict
The AVDictionary was unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:48:58 +02:00
Andreas Rheinhardt
e424d1f557 avfilter/vf_spp: Add dummy element to array to avoid shift
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:47:17 +02:00
Andreas Rheinhardt
a85d2de45f avfilter/vf_spp: Use preinit instead of init_dict
By using preinit, the AVDCT already exists directly after
allocating the filter, so that the filter's AVClass's child_next
becomes usable for setting options with the AV_OPT_SEARCH_CHILDREN
search flag. This means that it is no longer necessary to use
the init_dict callback for this filter.

Furthermore, the earlier code did not abide by the documentation
of the init_dict callback at all: Instead of only returning the
options that have not been recognized it always returned all options
on any av_opt_set() error and errored out in this case, even if it
is just an unrecognized option. This behaviour has been inherited by
avfilter_init_dict(), contradicting its documentation. This is also
fixed in this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:45:34 +02:00
Andreas Rheinhardt
0c34cf899d avfilter/af_aresample: Use preinit instead of init_dict
By using preinit, the SwrContext already exists directly after
allocating the filter, so that the filter's AVClass's child_next
becomes usable for setting options with the AV_OPT_SEARCH_CHILDREN
search flag. This means that it is no longer necessary to use
the init_dict callback for this filter.

Furthermore, the earlier code did not abide by the documentation
of the init_dict callback at all: Instead of only returning the
options that have not been recognized it always returned all options
on any av_opt_set() error and errored out in this case; yet if
the error was just caused by an unrecognized option, it should not
error out at all and instead return said option.

This behaviour has been inherited by avfilter_init_dict(),
contradicting its documentation. This is also fixed by this commit.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:44:27 +02:00
Andreas Rheinhardt
6c8f96f18b avformat/rtsp: Use av_dict_set_int()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:40:13 +02:00
Andreas Rheinhardt
f748ca801e avfilter/vf_readeia608: Use av_dict_set_int()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:39:25 +02:00
Andreas Rheinhardt
403d8c0188 avfilter/vf_scale: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:38:02 +02:00
Andreas Rheinhardt
4906a45ada avfilter/vsrc_testsrc: Deduplicate AVClasses
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:37:22 +02:00
Andreas Rheinhardt
f8047180a8 avfilter/vf_weave: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:36:03 +02:00
Andreas Rheinhardt
57bc79e76a avfilter/vf_stack: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:34:53 +02:00
Andreas Rheinhardt
56d3e840f6 avfilter/vf_premultiply: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:32:58 +02:00
Andreas Rheinhardt
443706d937 avfilter/vf_neighbor: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:32:05 +02:00
Andreas Rheinhardt
31adb960b7 avfilter/vf_maskedminmax: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:31:13 +02:00
Andreas Rheinhardt
412d645ba1 avfilter/vf_lut: Remove empty init function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:31:03 +02:00
Andreas Rheinhardt
b5be13255f avfilter/vf_lut: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:30:38 +02:00
Andreas Rheinhardt
57f6c23f29 avfilter/vf_format: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:28:03 +02:00
Andreas Rheinhardt
bb1ef872a3 avfilter/vf_blend: Don't redefine options name
Use AVFILTER_DEFINE_CLASS_EXT instead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:27:56 +02:00
Andreas Rheinhardt
39589d25e3 avfilter/src_movie: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:16 +02:00
Andreas Rheinhardt
a9f1b3db60 avfilter/split: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:07 +02:00
Andreas Rheinhardt
c8180c1310 avfilter/f_zmq: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:00 +02:00
Andreas Rheinhardt
a10a300606 avfilter/f_streamselect: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:55 +02:00
Andreas Rheinhardt
cf724beade avfilter/f_sendcmd: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:07 +02:00
Andreas Rheinhardt
fcea114b18 avfilter/f_realtime: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:00 +02:00
Andreas Rheinhardt
8435cf2307 avfilter/f_perms: Deduplicate AVClasses
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:09:06 +02:00
Andreas Rheinhardt
0eb1f45dd3 avfilter/f_graphmonitor: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:08:18 +02:00
Andreas Rheinhardt
9ceec2869a avfilter/f_drawgraph: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:08:10 +02:00
Andreas Rheinhardt
601e3da1d5 avfilter/f_cue: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:07:48 +02:00
Andreas Rheinhardt
974e8262c9 avfilter/af_sidechaincompress: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:05:55 +02:00
Andreas Rheinhardt
4ab80ac17e avfilter/af_biquads: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:04:12 +02:00
Andreas Rheinhardt
3000ac48d5 avfilter/af_asupercut: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:04:00 +02:00
Andreas Rheinhardt
8c4a7a4c09 avfilter/vf_convolution: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:01:37 +02:00
Andreas Rheinhardt
3208911055 avfilter/vf_convolution: Fix standalone build of kirsch, scharr filters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:00:05 +02:00
Andreas Rheinhardt
bc86e1b602 avfilter/af_agate: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 03:58:00 +02:00
Andreas Rheinhardt
cef920853f avformat/demux: Use av_opt_set_int() where appropriate
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-18 23:16:49 +02:00
Andreas Rheinhardt
4e0da7d311 avutil/buffer: Avoid allocation of AVBuffer when using buffer pool
Do this by putting an AVBuffer structure into BufferPoolEntry and
reuse it for all subsequent uses of said BufferPoolEntry.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-18 23:16:49 +02:00
Andreas Rheinhardt
6556146aa0 avfilter/vf_zscale: Don't make assumptions about zimg's range enums
zimg's color range enum values are off-by-one compared to ours;
therefore the code just adds one when converting from theirs to ours.
Yet this is not how one should deal with enums; use a switch instead.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-18 23:16:44 +02:00
Zhao Zhili
e4f499f842 avformat/libsrt: remove url_get_file_handle implementation
SRTSOCKET is an abstraction designed by libsrt, it's not guaranteed
to be a real file descriptor. Even if it is, it should not be
operated directly outside of libsrt.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-09-18 22:10:03 +02:00
Zhao Zhili
fc9832f255 avformat/libsrt: log streamid in listener mode
It's useful for test client which pass streamid to ffmpeg/ffplay.
For example, use ffmpeg to test streamid support in VLC:
./ffmpeg -v info -re -i foo.mp4 -c copy -f mpegts -mode listener srt://127.0.0.1:9000
./vlc srt://127.0.0.1:9000?streamid=foobar

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-09-18 21:44:25 +02:00
Nicolas Jorge Dato
5a0a9f7825 avformat/mpegts: fixes overflow when parsing the PMT
When a possible overflow was detected, there was a break to exit the while
loop. However, it should have already substracted 2 bytes from
program_info_length (descriptor ID + length).

Fixes ticket #9422.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-09-18 21:19:39 +02:00
Wu Jianhua
7bbad32d5a libavfilter/x86/vf_gblur: correct the order of loop step
The problem was caused by if the width of the processed block
minus 1 is a multiple of the aligned number the instruction
jle .bscale_scalar would skip the Optimized Loop Step, which
will lead to an incorrect sampling when specifying steps more
than 1. Move the Optimized Loop Step after .bscale_scalar to
ensure the loop step is enabled.

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-09-18 12:38:01 +02:00
Wu Jianhua
fcf10c925d libavfilter/x86/vf_gblur: fixed the fate-test failed on MacOS
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-09-18 12:37:56 +02:00
Pavel Koshevoy
4fc0b75973 avfilter/vf_zscale: fix output color_range discrepancy
This filter chain was supposed to convert from narrow range
to full range yuv444p, but didn't:

buffer=width=1280:height=720:pix_fmt=yuv444p:frame_rate=25/1:\
time_base=1/25:sar=1/1,zscale=min=709:rin=limited:pin=709:\
tin=709:t=linear,format=gbrpf32le,zscale=tin=linear:p=709:m=709:\
r=full:t=709,format=pix_fmts=yuv444p,buffersink
2021-09-17 13:35:59 -06:00
Michael Niedermayer
5a95abcce4 avcodec/mpeg12dec: Do not put mpeg_f_code into an invalid state on error return
Fixes: invalid shift
Fixes: 37018/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG2VIDEO_fuzzer-5290280902328320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-17 19:56:05 +02:00