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

Git pushed a commit to branch master
in repository ffmpeg.

commit 0a2e0b28d01566342c45f8ab8e3f4d7e041081ea
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Sun May 17 15:04:19 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Sun May 31 03:43:29 2026 +0000

    avformat/mov: add support for vdep based tref
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavformat/mov.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index eeb825cc90..ccc7aef2f3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2631,6 +2631,33 @@ static int mov_read_sbas(MOVContext* c, AVIOContext* pb, 
MOVAtom atom)
     return 0;
 }
 
+static int mov_read_vdep(MOVContext* c, AVIOContext* pb, MOVAtom atom)
+{
+    AVStream* st;
+    MOVStreamContext* sc;
+
+    if (c->fc->nb_streams < 1)
+        return 0;
+
+    if (atom.size > 4)
+        av_log(c->fc, AV_LOG_WARNING, "More than one vdep reference is not 
supported.\n");
+    if (atom.size < 4)
+        return AVERROR_INVALIDDATA;
+
+    st = c->fc->streams[c->fc->nb_streams - 1];
+    sc = st->priv_data;
+
+    MovTref *tag = mov_add_tref_tag(sc, atom.type);
+    if (!tag)
+        return AVERROR(ENOMEM);
+
+    int ret = mov_add_tref_id(tag, avio_rb32(pb));
+    if (ret < 0)
+        return ret;
+
+    return 0;
+}
+
 /**
  * An strf atom is a BITMAPINFOHEADER struct. This struct is 40 bytes itself,
  * but can have extradata appended at the end after the 40 bytes belonging
@@ -9668,6 +9695,7 @@ static const MOVParseTableEntry mov_default_parse_table[] 
= {
 { MKTAG('p','a','s','p'), mov_read_pasp },
 { MKTAG('c','l','a','p'), mov_read_clap },
 { MKTAG('s','b','a','s'), mov_read_sbas },
+{ MKTAG('v','d','e','p'), mov_read_vdep },
 { MKTAG('s','i','d','x'), mov_read_sidx },
 { MKTAG('s','t','b','l'), mov_read_default },
 { MKTAG('s','t','c','o'), mov_read_stco },

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

Reply via email to