The branch, master has been updated
       via  632958d2bfbd863a21f75ee8f25abe76a824e295 (commit)
       via  07581d67365d00f569b701ea905dbb394030a711 (commit)
       via  0734d1c55aedaf2df4a51488f9b75e42daf9f707 (commit)
      from  84fcbce16c75f64343e6ef03609390cfb50bfa94 (commit)


- Log -----------------------------------------------------------------
commit 632958d2bfbd863a21f75ee8f25abe76a824e295
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Oct 28 16:10:45 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Wed Nov 5 23:45:31 2025 +0800

    avformat/mov: log unknown tag via av_fourcc2str
    
    Signed-off-by: Zhao Zhili <[email protected]>

diff --git a/libavformat/mov.c b/libavformat/mov.c
index e9c89acdbb..eab9f79577 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6668,7 +6668,8 @@ static int mov_read_pack(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
                 // This means value will be set in another layer
                 break;
             default:
-                av_log(c->fc, AV_LOG_WARNING, "Unknown tag in pkin: 0x%08X\n", 
tag);
+                av_log(c->fc, AV_LOG_WARNING, "Unknown tag in pkin: %s\n",
+                       av_fourcc2str(tag));
                 avio_skip(pb, size - 8);
                 break;
             }
@@ -6676,7 +6677,8 @@ static int mov_read_pack(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
             break;
         }
         default:
-            av_log(c->fc, AV_LOG_WARNING, "Unknown tag in pack: 0x%08X\n", 
tag);
+            av_log(c->fc, AV_LOG_WARNING, "Unknown tag in pack: %s\n",
+                   av_fourcc2str(tag));
             avio_skip(pb, size - 8);
             break;
         }
@@ -6868,7 +6870,8 @@ static int mov_read_vexu_proj(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 
     tag = avio_rl32(pb);
     if (tag != MKTAG('p','r','j','i')) {
-        av_log(c->fc, AV_LOG_ERROR, "Invalid child box of proj box: 0x%08X\n", 
tag);
+        av_log(c->fc, AV_LOG_ERROR, "Invalid child box of proj box: %s\n",
+               av_fourcc2str(tag));
         return AVERROR_INVALIDDATA;
     }
 
@@ -6898,7 +6901,7 @@ static int mov_read_vexu_proj(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
         projection = AV_SPHERICAL_PARAMETRIC_IMMERSIVE;
         break;
     default:
-        av_log(c->fc, AV_LOG_ERROR, "Invalid projection type in prji box: 
0x%08X\n", tag);
+        av_log(c->fc, AV_LOG_ERROR, "Invalid projection type in prji box: 
%s\n", av_fourcc2str(tag));
         return AVERROR_INVALIDDATA;
     }
 
@@ -7011,7 +7014,8 @@ static int mov_read_eyes(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 
             subtag = avio_rl32(pb);
             if (subtag != MKTAG('b','l','i','n')) {
-                av_log(c->fc, AV_LOG_ERROR, "Expected blin box, got 0x%08X\n", 
subtag);
+                av_log(c->fc, AV_LOG_ERROR, "Expected blin box, got %s\n",
+                       av_fourcc2str(subtag));
                 return AVERROR_INVALIDDATA;
             }
 
@@ -7039,7 +7043,8 @@ static int mov_read_eyes(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 
             subtag = avio_rl32(pb);
             if (subtag != MKTAG('d','a','d','j')) {
-                av_log(c->fc, AV_LOG_ERROR, "Expected dadj box, got 0x%08X\n", 
subtag);
+                av_log(c->fc, AV_LOG_ERROR, "Expected dadj box, got %s\n",
+                       av_fourcc2str(subtag));
                 return AVERROR_INVALIDDATA;
             }
 
@@ -7054,7 +7059,8 @@ static int mov_read_eyes(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
             break;
         }
         default:
-            av_log(c->fc, AV_LOG_WARNING, "Unknown tag in eyes: 0x%08X\n", 
tag);
+            av_log(c->fc, AV_LOG_WARNING, "Unknown tag in eyes: %s\n",
+                   av_fourcc2str(tag));
             avio_skip(pb, size - 8);
             break;
         }
@@ -7131,7 +7137,8 @@ static int mov_read_vexu(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
             break;
         }
         default:
-            av_log(c->fc, AV_LOG_WARNING, "Unknown tag in vexu: 0x%08X\n", 
tag);
+            av_log(c->fc, AV_LOG_WARNING, "Unknown tag in vexu: %s\n",
+                   av_fourcc2str(tag));
             avio_skip(pb, size - 8);
             break;
         }

commit 07581d67365d00f569b701ea905dbb394030a711
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Oct 28 16:02:10 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Wed Nov 5 23:45:31 2025 +0800

    avformat/mov: check prji box version and flags
    
    Signed-off-by: Zhao Zhili <[email protected]>

diff --git a/libavformat/mov.c b/libavformat/mov.c
index d08fd01054..e9c89acdbb 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6872,8 +6872,13 @@ static int mov_read_vexu_proj(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
         return AVERROR_INVALIDDATA;
     }
 
-    avio_skip(pb, 1); // version
-    avio_skip(pb, 3); // flags
+     // version and flags, only support (0, 0)
+    unsigned n = avio_rl32(pb);
+    if (n != 0) {
+        av_log(c->fc, AV_LOG_ERROR, "prji version %u, flag %u are not 
supported\n",
+               n & 0xFF, n >> 8);
+        return AVERROR_PATCHWELCOME;
+    }
 
     tag = avio_rl32(pb);
     switch (tag) {

commit 0734d1c55aedaf2df4a51488f9b75e42daf9f707
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Oct 28 15:43:46 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Wed Nov 5 23:45:31 2025 +0800

    avformat/mov: relax check on proj box size
    
    Pico VR adds a '\0' after projection_type (a real C string than
    a fourcc). It's not strictly correct, but doesn't affect parsing.
    
    [prji: Projection Information Box]
        position = 149574743
        size = 17
        version = 0
        flags = 0x000000
        projection_type = rect
    
    Co-Authored-by: Keven Ma
    Signed-off-by: Zhao Zhili <[email protected]>

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 42062e6ba6..d08fd01054 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6853,15 +6853,17 @@ static int mov_read_vexu_proj(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
     st = c->fc->streams[c->fc->nb_streams - 1];
     sc = st->priv_data;
 
-    if (atom.size != 16) {
+    if (atom.size < 16) {
         av_log(c->fc, AV_LOG_ERROR, "Invalid size for proj box: %"PRIu64"\n", 
atom.size);
         return AVERROR_INVALIDDATA;
     }
 
     size = avio_rb32(pb);
-    if (size != 16) {
+    if (size < 16) {
         av_log(c->fc, AV_LOG_ERROR, "Invalid size for prji box: %d\n", size);
         return AVERROR_INVALIDDATA;
+    } else if (size > 16) {
+        av_log(c->fc, AV_LOG_WARNING, "Box has more bytes (%d) than prji box 
required (16) \n", size);
     }
 
     tag = avio_rl32(pb);

-----------------------------------------------------------------------

Summary of changes:
 libavformat/mov.c | 38 ++++++++++++++++++++++++++------------
 1 file changed, 26 insertions(+), 12 deletions(-)


hooks/post-receive
-- 

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

Reply via email to