* [FFmpeg-devel] [PATCH] avformat/mov: fix missing video size when some decoders are disabled (PR #20669)
@ 2025-10-08 15:55 Zhao Zhili via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Zhao Zhili via ffmpeg-devel @ 2025-10-08 15:55 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Zhao Zhili
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/20250722124552.885-1-15083277223@163.com/
>From e47f7019bf56b998a142675356a98b94065a3476 Mon Sep 17 00:00:00 2001
From: Zhao Zhili <zhilizhao@tencent.com>
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 -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-08 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-08 15:55 [FFmpeg-devel] [PATCH] avformat/mov: fix missing video size when some decoders are disabled (PR #20669) Zhao Zhili via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ http://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git