[FFmpeg-devel] IMF demuxer ping

2021-12-04 Thread Pierre-Anthony Lemieux
Hi all, Quick ping re: libavformat/imf demuxer patch set. All outstanding feedback (thanks!) has been addressed as far as I know. What are the next steps? It would be good to make progress while it is fresh in peoples' minds. Latest patchset at [1] and tracking PR at [2] (including memory lea

[FFmpeg-devel] [PATCH 4/4] avformat/mov: Check next offset in mov_read_dref()

2021-12-04 Thread Michael Niedermayer
Fixes: signed integer overflow: 9223372036200463215 + 1109914409 cannot be represented in type 'long' Fixes: 41480/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6553086177443840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off

[FFmpeg-devel] [PATCH 2/4] avcodec/avpacket: Perform fewer reallocations in repeated av_grow_packet()

2021-12-04 Thread Michael Niedermayer
Fixes: Timeout Fixes: 41446/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-4667644540747776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/avpacket.c | 7 ++- 1 file changed, 6 ins

[FFmpeg-devel] [PATCH 1/4] avformat/mov: Check for EOF in mov_read_glbl()

2021-12-04 Thread Michael Niedermayer
Fixes: Infinite loop Fixes: 41351/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5433895854669824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 ++ 1 file changed, 2 inserti

[FFmpeg-devel] [PATCH 3/4] avformat/mxfdec: Check component_depth in mxf_get_color_range()

2021-12-04 Thread Michael Niedermayer
Fixes: shift exponent 4294967163 is too large for 32-bit type 'int' Fixes: 41449/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6183636217495552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- l

[FFmpeg-devel] [PATCH v3 4/5] avformat: introduce AVFormatContext io_close2 which returns an int

2021-12-04 Thread Marton Balint
Otherwise there is no way to detect an error returned by avio_close() because ff_format_io_close cannot get the return value. Checking the return value of the close function is important in order to check if all data was successfully written and the underlying close() operation was successful. It

Re: [FFmpeg-devel] [PATCH v2 4/5] avformat: introduce AVFormatContext io_close2 which returns an int

2021-12-04 Thread Marton Balint
On Sat, 4 Dec 2021, Hendrik Leppkes wrote: On Sat, Dec 4, 2021 at 9:00 PM Marton Balint wrote: Otherwise there is no way to detect any error during avio_close(). Returning errors is nice and all, but whats the expected reaction to an error here, since we're already trying to close? Can'

Re: [FFmpeg-devel] [PATCH v2 4/5] avformat: introduce AVFormatContext io_close2 which returns an int

2021-12-04 Thread Hendrik Leppkes
On Sat, Dec 4, 2021 at 9:00 PM Marton Balint wrote: > > Otherwise there is no way to detect any error during avio_close(). > Returning errors is nice and all, but whats the expected reaction to an error here, since we're already trying to close? Can't exactly close and go home (since thats what y

[FFmpeg-devel] [PATCH v2 4/5] avformat: introduce AVFormatContext io_close2 which returns an int

2021-12-04 Thread Marton Balint
Otherwise there is no way to detect any error during avio_close(). Signed-off-by: Marton Balint --- doc/APIchanges | 3 +++ libavformat/avformat.h | 13 + libavformat/dashenc.c | 1 + libavformat/fifo.c | 1 + libavformat/hlsenc.c | 1 + libavformat/internal.h | 6

[FFmpeg-devel] [PATCH 2/6] ffmpeg: change vsync value to an enum

2021-12-04 Thread Anton Khirnov
Stop explicitly defining VSCFR and DROP values, which were never documented. --- fftools/ffmpeg.c | 3 ++- fftools/ffmpeg.h | 16 +--- fftools/ffmpeg_opt.c | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 181494

[FFmpeg-devel] [PATCH 6/6] ffmpeg: handle errors in print_sdp()

2021-12-04 Thread Anton Khirnov
Do not continue as if nothing happened. --- fftools/ffmpeg.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 1936367463..11cdf69af0 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2764,17

[FFmpeg-devel] [PATCH 5/6] ffmpeg: move setting video sync method to new_video_stream()

2021-12-04 Thread Anton Khirnov
do_video_out() is the wrong place for it, since the necessary information is already known when creating the stream and its value should never change. --- fftools/ffmpeg.c | 25 +++-- fftools/ffmpeg.h | 1 + fftools/ffmpeg_opt.c | 24 3 files c

[FFmpeg-devel] [PATCH 3/6] FATE: stop using numeric arguments to -vsync

2021-12-04 Thread Anton Khirnov
Symbolic names are always preferable. --- tests/fate/h264.mak | 4 ++-- tests/fate/hevc.mak | 2 +- tests/fate/mov.mak| 4 ++-- tests/fate/mpeg4.mak | 2 +- tests/fate/vcodec.mak | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/fate/h264.mak b/tests/fate/h264

[FFmpeg-devel] [PATCH 4/6] ffmpeg: deprecate passing numbers to -vsync

2021-12-04 Thread Anton Khirnov
There is never a reason to do this, using symbolic names is always preferred. --- doc/ffmpeg.texi | 16 +--- fftools/ffmpeg_opt.c | 7 +-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 20a547381c..164419cad3 100644 ---

[FFmpeg-devel] [PATCH 1/6] ffmpeg: drop useless framerate assignments

2021-12-04 Thread Anton Khirnov
If the input stream framerate is known, it will be configured on the relevant filtergraph input and get propagated to the output stream in the above line. That makes these assignments redundant. --- fftools/ffmpeg.c | 4 1 file changed, 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/

[FFmpeg-devel] [PATCH 3/3] lavf/sdp: add more thorough error handling

2021-12-04 Thread Anton Khirnov
Return error codes when constructing a stream config fails, rather than just disregarding the failure and continuing. Propagate the error codes from av_sdp_create(). --- libavformat/internal.h | 7 +- libavformat/sdp.c | 189 + 2 files changed, 120 in

[FFmpeg-devel] [PATCH 2/3] lavf/sdp: reindent switch() according to our conventions

2021-12-04 Thread Anton Khirnov
--- libavformat/sdp.c | 504 +++--- 1 file changed, 252 insertions(+), 252 deletions(-) diff --git a/libavformat/sdp.c b/libavformat/sdp.c index ec5f7b763d..1cdd21c97b 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -487,278 +487,278 @@ static cha

[FFmpeg-devel] [PATCH 1/3] lavf/sdp: add const qualifiers where appropriate

2021-12-04 Thread Anton Khirnov
Declares that these structs are read-only for this code. --- libavformat/internal.h | 2 +- libavformat/rtp.c | 4 ++-- libavformat/rtp.h | 4 ++-- libavformat/sdp.c | 21 +++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/libavformat/internal.

Re: [FFmpeg-devel] [PATCH 1/2] lavu/frame: drop mentions of non-refcounted frames

2021-12-04 Thread Anton Khirnov
pushed -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v2] fftools/cmdutils: Avoid crash when opts is empty

2021-12-04 Thread Yu Yang
Opts is assigned by setup_find_stream_info_opts(). Could not get opts when nb_streams == 0. It should not return NULL but print AV_LOG_ERROR. when no alloc memory for stream options, it also need return an error to avoid crash when free. In total, setup_find_stream_info_opts() should not return