av_probe_input_buffer2() iterates until *fmt is found. If *fmt is not zeroed out beforehand, no probes will be taken because it is detected that format is already found at the beginning. In these cases method returns success with *fmt potentially containing the previous junk.
Signed-off-by: zsugabubus <zsugabubus@national.shitposting.agency> --- libavformat/format.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/format.c b/libavformat/format.c index c47490c..7a5e846 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -229,6 +229,8 @@ int av_probe_input_buffer2(AVIOContext *pb, ff_const59 AVInputFormat **fmt, int score = 0; int ret2; + *fmt = NULL; + if (!max_probe_size) max_probe_size = PROBE_BUF_MAX; else if (max_probe_size < PROBE_BUF_MIN) { -- 2.28.0 _______________________________________________ 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".