PR #20669 opened by Zhao Zhili (quink) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20669 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20669.patch
Fix #20667 The first version of patch was right, sorry I suggested the wrong direction. https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/ >From e47f7019bf56b998a142675356a98b94065a3476 Mon Sep 17 00:00:00 2001 From: Zhao Zhili <[email protected]> Date: Wed, 8 Oct 2025 23:31:11 +0800 Subject: [PATCH] avformat/mov: fix missing video size when some decoders are disabled Fix #20667 --- libavformat/mov.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 7fe4678234..922e001e5e 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5243,16 +5243,22 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) #endif } +#if CONFIG_H261_DECODER || CONFIG_H263_DECODER || CONFIG_MPEG4_DECODER switch (st->codecpar->codec_id) { +#if CONFIG_H261_DECODER case AV_CODEC_ID_H261: +#endif +#if CONFIG_H263_DECODER case AV_CODEC_ID_H263: +#endif +#if CONFIG_MPEG4_DECODER case AV_CODEC_ID_MPEG4: +#endif st->codecpar->width = 0; /* let decoder init width/height */ st->codecpar->height= 0; break; - default: - break; } +#endif // If the duration of the mp3 packets is not constant, then they could need a parser if (st->codecpar->codec_id == AV_CODEC_ID_MP3 -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
