Anton Khirnov
a7aa05c599
fftools/ffmpeg_filter: add an AVClass to FilterGraph
...
Use it for logging.
2023-06-19 09:48:55 +02:00
Anton Khirnov
a934392db0
fftools/ffmpeg_enc: move dup_warning global variable to Encoder
2023-06-19 09:48:55 +02:00
Anton Khirnov
1adad44fc7
fftools/ffmpeg_dec: move InputStream.hwaccel_pix_fmt to Decoder
...
It is purely decoder-internal state.
2023-06-19 09:48:55 +02:00
Anton Khirnov
174cb3accf
fftools/ffmpeg_dec: remove pointless InputStream.hwaccel_retrieve_data
...
It is always set to hwaccel_retrieve_data() from ffmpeg_hw.c, so that
function can just be called directly instead.
2023-06-19 09:48:55 +02:00
Anton Khirnov
25d96ab6c0
fftools/ffmpeg_hw: inline hwaccel_decode_init() into its caller
...
The function is now trivial and cannot fail, so all error handling in
its caller can be removed.
2023-06-19 09:48:55 +02:00
Anton Khirnov
6c9cbf7507
fftools/ffmpeg_demux: reindent after previous commit
2023-06-19 09:48:55 +02:00
Anton Khirnov
98766dbbd7
fftools/ffmpeg_demux: move the loop out of add_input_streams()
...
Make the function process just one input stream at a time and save an
indentation level. Also rename it to ist_add() to be consistent with an
analogous function in ffmpeg_mux_init.
2023-06-19 09:48:55 +02:00
Anton Khirnov
47a14b542e
tests/fate: add a test for -streamloop with transcoding video+audio
2023-06-19 09:48:55 +02:00
Anton Khirnov
90a26e75a4
tests/fate: rename ffmpeg-streamloop to ffmpeg-streamloop-copy
...
Makes it clear that this tests -streamloop with streamcopy, to
distinguish it from further -streamloop tests added in future commits.
2023-06-19 09:48:55 +02:00
Anton Khirnov
df81fb46ee
fftools/ffmpeg_dec: simplify process_subtitle()
...
Its got_output argument always points to 1.
2023-06-19 09:48:55 +02:00
Anton Khirnov
e9eb44ed88
fftools/ffmpeg_dec: drop always-0 InputStream.prev_sub.ret
2023-06-19 09:48:55 +02:00
Anton Khirnov
52d7ea6635
doc/ffmpeg: improve -stats_*_fmt documentation
2023-06-19 09:48:10 +02:00
Martin Storsjö
a33191ff7a
fate/cbs: Fix the ffprobe dependency for Windows targets
...
Signed-off-by: Martin Storsjö <martin@martin.st >
2023-06-19 09:25:32 +03:00
Zhao Zhili
f66e1862e3
avcodec/videotoolboxenc: inherit profile from AVCodecContext
...
This can happen when user set the avctx->profile field directly
instead of specify profile via option.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:37 +08:00
Zhao Zhili
3fafc842f1
avcodec/videotoolboxenc: remove AUTO_PROFILE define
...
Use FF_PROFILE_UNKNOWN as auto mode.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:37 +08:00
Zhao Zhili
315c66af0f
avcodec/videotoolboxenc: use int as the type of profile
...
Other than save a few bytes, it also has the benefit to show the
AV_OPT_TYPE_CONST value in help, e.g.,
-profile <int> E..V....... Profile (from 0 to INT_MAX) (default 0)
baseline 66 E..V....... Baseline Profile
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:37 +08:00
Zhao Zhili
fb85aa959a
avcodec/mediacodecenc: add profile names to options
...
H.264 high10/high422/high44 are unlikely supported by devices.
It's there for developers to do the experiment.
H.265 main10 works on my device with AV_PIX_FMT_MEDIACODEC.
OMX_COLOR_FormatYUV420Planar16 doesn't work.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:29 +08:00
Zhao Zhili
e349b45fa0
fate/cbs: add tests for discard_units
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 11:52:18 +08:00
Zhao Zhili
4a00cd4fe3
avcodec/filter_units_bsf: reindent after previous commit
2023-06-19 11:52:18 +08:00
Zhao Zhili
dfa0e24e98
avcodec/filter_units_bsf: add skip frame support
2023-06-19 11:52:18 +08:00
Zhao Zhili
4144584010
avcodec/cbs_h2645: add discard_unit implementation for H.265
2023-06-19 11:52:18 +08:00
Zhao Zhili
e7cde0cbd5
avcodec/cbs_h2645: add discarded_unit implementation for H.264
2023-06-19 11:52:18 +08:00
Zhao Zhili
a8aeab107e
avcodec/cbs: add API to discard units by AVDiscard
2023-06-19 11:52:18 +08:00
James Almer
5e9986fd2d
avformat/evc: use get_ue_golomb_long()
...
Fixes compilation of shared libraries, as well as correctly parses
width and height values.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-18 23:40:46 -03:00
Michael Niedermayer
9fc141f32d
avformat/jpegxl_anim_dec: Perform operations in a different order
...
Fixes: OOM
Fixes: 59802/clusterfuzz-testcase-minimized-ffmpeg_dem_JPEGXL_ANIM_fuzzer-5681765466112000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 17:54:19 -04:00
Leo Izen
61047f0f82
avformat/jpegxl_anim_dec: avoid overrun with jxlp boxes in container
...
This switches the jpegxl_collect_codestream_header function to use
avcodec/bytestream2, which better enforces barriers, and should avoid
overrunning buffers with jxlp boxes if the size is zero or if the size
is so small the box is invalid.
Signed-off-by: Leo Izen <leo.izen@gmail.com >
2023-06-18 10:31:05 -04:00
Michael Niedermayer
6f2cf88771
avcodec/hevc_refs: Check that nb_refs stays <= HEVC_MAX_REFS
...
Fixes: 58528/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5834725318328320
Fixes: index 16 out of bounds for type 'int [16]'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:13 +02:00
Michael Niedermayer
a0f4d4e650
avcodec/hevcdec: Avoid null pointer dereferences in MC
...
Fixes: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xfffffffffffffff8
Fixes: 58440/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5956015530311680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:13 +02:00
Michael Niedermayer
ff8a496d41
avcodec/takdsp: Fix integer overflows
...
Fixes: avcodec/takdsp.c:44:23: runtime error: signed integer overflow: -2097158 - 2147012608 cannot be represented in type 'int'
Fixes: 58417/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5268919664640000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:12 +02:00
Michael Niedermayer
adfe003f51
avcodec/mpegvideo_dec: Add NULL pointer checks to MPV_motion_lowres()
...
This makes the null pointer checks match mpv_motion_internal()
Fixes: NULL pointer dereference
Fixes: 59671/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-4993004566609920
Fixes: 59678/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEGVIDEO_fuzzer-4893168991338496
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:12 +02:00
Michael Niedermayer
d7d3f1af2a
avcodec/mpegvideo_dec: consider interlaced lowres 4:2:0 chroma in edge emulation check better
...
Fixes: out of array read
Fixes: 59673/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5194311374077952
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:12 +02:00
Michael Niedermayer
e736238b35
avcodec/rka: use unsigned for buf0 additions
...
Fixes: signed integer overflow: -38912000 + -2109276160 cannot be represented in type 'int'
Fixes: 59670/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-4987563245699072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:11 +02:00
Michael Niedermayer
1ee303f1e1
avcodec/rka: Avoid undefined left shift
...
Fixes: left shift of 34136248 by 6 places cannot be represented in type 'int'
Fixes: 58429/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5692211592560640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:11 +02:00
Michael Niedermayer
fead656a7b
avcodec: Ignoring errors is only possible before the input end
...
Fixes: out of array read
Fixes: Ticket 10308
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:11 +02:00
Paul B Mahol
8e21f32fe7
avfilter/vf_displace: add support for commands
2023-06-18 11:11:46 +02:00
Paul B Mahol
54dc06e09e
avfilter/vf_displace: add slice threading support
2023-06-18 11:11:46 +02:00
Paul B Mahol
494ebfdbfa
avfilter/af_drmeter: misc cleanups
2023-06-18 02:21:29 +02:00
Paul B Mahol
238ec0c31b
avfilter/af_drmeter: fix error in picking 2nd peak
2023-06-18 02:21:29 +02:00
Paul B Mahol
c44fe10160
avfilter/af_afade: stop using ff_outlink_get_status on inputs
2023-06-17 22:36:31 +02:00
Paul B Mahol
a756ae41ed
avfilter/af_apad: switch to activate
...
Fixes EOF PTS reporting.
Also allowing previous/next filters in graph to release no longer needed resources.
2023-06-17 21:33:01 +02:00
Paul B Mahol
4583a24c65
avfilter/vf_xfade: add reveal transitions
2023-06-17 19:48:10 +02:00
Paul B Mahol
8fe25b1203
avfilter/vf_xfade: add cover transitions
2023-06-17 19:48:09 +02:00
Anton Khirnov
593e8c2c6a
lavc/binkaudio: reset input packet on errors
...
Make sure we don't repeatedly try to decode the same packet, making no
progress and possibly causing an infinite loop.
2023-06-17 18:06:33 +02:00
Armin Hasitzka
f2349e7e62
avformat/hls: Forward stream metadata from subdemuxer
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2023-06-17 18:06:33 +02:00
James Almer
dbc4c22890
avcodec/evc_parse: add missing includes
...
Fixes make checkheaders.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 12:43:15 -03:00
James Almer
be91c5c80d
configure: fix evc related dependencies
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:16:45 -03:00
James Almer
f24064e627
avcodec/evc_frame_merge_bsf: free EVCFMergeContext on flush and close
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
b1d0b59d81
avcodec/evc_frame_merge_bsf: check for av_memdup() failure
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
9fc1d9adc8
avcodec/evc_parse: make freeing EVCParserContext buffers a shared function
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
46a9be01b8
avcodec/evc_parse: free pps struct on parsing failure
...
Prevents future checks for their presence from succeeding.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00