This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new e7696934fc avformat/movenc: omit unrepresentable 3GP album track 
numbers
e7696934fc is described below

commit e7696934fc1a8422e8f4e4918b5ec97f360b6a5a
Author:     Baptiste Coudurier <[email protected]>
AuthorDate: Fri Nov 13 21:25:03 2026 -0800
Commit:     Baptiste Coudurier <[email protected]>
CommitDate: Thu Nov 19 21:35:24 2026 +0000

    avformat/movenc: omit unrepresentable 3GP album track numbers
    
    TS 26.244 TrackNumber is an optional 8-bit field;
    skip it when the track does not fit.
    
    Signed-off-by: Baptiste Coudurier <[email protected]>
---
 libavformat/movenc.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index da1a44d757..7e510a63b1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5177,8 +5177,13 @@ static int mov_write_3gp_udta_tag(AVIOContext *pb, 
AVFormatContext *s,
         avio_wb16(pb, language_code("eng")); /* language */
         avio_write(pb, t->value, strlen(t->value) + 1); /* UTF8 string value */
         if (!strcmp(tag, "albm") &&
-            (t = av_dict_get(s->metadata, "track", NULL, 0)))
-            avio_w8(pb, atoi(t->value));
+            (t = av_dict_get(s->metadata, "track", NULL, 0))) {
+            char *end;
+            long track = strtol(t->value, &end, 10);
+            if (end != t->value && (!*end || *end == '/') &&
+                track >= 0 && track <= UINT8_MAX)
+                avio_w8(pb, track);
+        }
     }
     return update_size(pb, pos);
 }

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to