PR #23427 opened by Totto16 URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23427 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23427.patch
When we encounter a custom tag in `mov_read_custom` we ignore it, if the number of AVFormatContext.streams is below 1 this is confusing, as some mp4 encoders write custom meta tags before any stream is found, so they are silently ignored this at least adds a log, so that users understand the reason for the ignored metadata An example for such an encoder would be https://github.com/quodlibet/mutagen when writing new tags fore mp4 files. Signed-off-by: Totto16 <[email protected]> >From 05b993546aad1031b5f367375570f82371a0ae78 Mon Sep 17 00:00:00 2001 From: Totto16 <[email protected]> Date: Wed, 10 Jun 2026 02:52:52 +0200 Subject: [PATCH] avformat/mov: add verbose log for ignored custom tags When we encounter a custom tag in `mov_read_custom` we ignore it, if the number of AVFormatContext.streams is below 1 this is confusing, as some mp4 encoders write custom meta tags before any stream is found, so they are silently ignored this at least adds a log, so that users understand the reason for the ignored metadata Signed-off-by: Totto16 <[email protected]> --- libavformat/mov.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 997a92dc0b..f65aa688ad 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5520,8 +5520,11 @@ static int mov_read_custom(MOVContext *c, AVIOContext *pb, MOVAtom atom) AVStream *st; MOVStreamContext *sc; - if (c->fc->nb_streams < 1) + if (c->fc->nb_streams < 1){ + av_log(c->fc, AV_LOG_VERBOSE, + "Skipping custom metadata since no streams were found\n"); return 0; + } st = c->fc->streams[c->fc->nb_streams-1]; sc = st->priv_data; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
