Hi!

Attached patch avoids writing an mp4 file that cannot be read by
FFmpeg (only be vlc) in some use cases.

Please comment, Carl Eugen
From 42b5e30f3bf13620a41ed92181f7b0358873e764 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@gmail.com>
Date: Tue, 31 Mar 2020 00:17:44 +0200
Subject: [PATCH] lavf/movenc: Do not write an empty av1C box.

---
 libavformat/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 1c178fc4bc..8cdd406335 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2098,7 +2098,7 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
             mov_write_uuid_tag_ipod(pb);
     } else if (track->par->codec_id == AV_CODEC_ID_VP9) {
         mov_write_vpcc_tag(mov->fc, pb, track);
-    } else if (track->par->codec_id == AV_CODEC_ID_AV1) {
+    } else if (track->par->codec_id == AV_CODEC_ID_AV1 && track->vos_len > 0) {
         mov_write_av1c_tag(pb, track);
     } else if (track->par->codec_id == AV_CODEC_ID_VC1 && track->vos_len > 0)
         mov_write_dvc1_tag(pb, track);
-- 
2.24.1

_______________________________________________
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".

Reply via email to