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

Git pushed a commit to branch master
in repository ffmpeg.

commit a302c9ae44ec07cbe12417f14c1852868f903f60
Author:     Vignesh Venkat <[email protected]>
AuthorDate: Wed Apr 29 17:02:43 2026 -0700
Commit:     James Almer <[email protected]>
CommitDate: Tue Jul 14 15:50:24 2026 -0300

    avformat/mov: Add itut-t35 data codec support
    
    The specification for the T35MetaDataSampleEntry ('it35') box is
    available in the "Draft text of ISO/IEC 14496-12 10th edition"
    which can be found on the MPEG website:
    https://www.mpeg.org/standards/MPEG-4/12/
    
    Support the t35 track in mov and export the `t35_identifier`
    as extradata and human readable sample description as the stream
    description.
    
    Signed-off-by: Vignesh Venkat <[email protected]>
---
 libavformat/isom.c |  1 +
 libavformat/mov.c  | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index 8a1128ac35..0a2f93d762 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -81,6 +81,7 @@ const AVCodecTag ff_codec_movsubtitle_tags[] = {
 
 const AVCodecTag ff_codec_movdata_tags[] = {
     { AV_CODEC_ID_BIN_DATA, MKTAG('g', 'p', 'm', 'd') },
+    { AV_CODEC_ID_ITUT_T35, MKTAG('i', 't', '3', '5') },
     { AV_CODEC_ID_NONE, 0 },
 };
 
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 4154038d9e..838c533e99 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3054,6 +3054,33 @@ static int mov_parse_stsd_data(MOVContext *c, 
AVIOContext *pb,
                 }
             }
         }
+    } else if (st->codecpar->codec_id == AV_CODEC_ID_ITUT_T35) {
+        int t35_identifier_length = avio_r8(pb);
+
+        if (t35_identifier_length <= 0 || t35_identifier_length >= size)
+            return AVERROR_INVALIDDATA;
+
+        ret = ff_get_extradata(c->fc, st->codecpar, pb, t35_identifier_length);
+        if (ret < 0)
+            return ret;
+
+        int hrsd_len = size - t35_identifier_length - 1;
+        if (hrsd_len > 0) {
+            uint8_t *hrsd_str = av_malloc(hrsd_len + 1);
+            if (!hrsd_str)
+                return AVERROR(ENOMEM);
+
+            ret = ffio_read_size(pb, hrsd_str, hrsd_len);
+            if (ret < 0) {
+                av_free(hrsd_str);
+                return ret;
+            }
+            if (hrsd_str[0]) {
+                hrsd_str[hrsd_len] = 0;
+                ret = av_dict_set(&st->metadata, "description", hrsd_str, 
AV_DICT_DONT_OVERWRITE);
+            }
+            av_free(hrsd_str);
+        }
     } else {
         /* other codec type, just skip (rtp, mp4s ...) */
         avio_skip(pb, size);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to