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 e4c631731e avformat/mov: allow outputting potentially truncated APV 
packets
e4c631731e is described below

commit e4c631731eb4dae984a8e7097e96f58f2634df88
Author:     James Almer <[email protected]>
AuthorDate: Mon May 25 19:14:40 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Thu Jun 11 21:09:24 2026 +0000

    avformat/mov: allow outputting potentially truncated APV packets
    
    The size field could be wrong while the actual payload is valid.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/mov.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 997a92dc0b..1c3e79ccc9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -11776,12 +11776,15 @@ static int mov_read_packet(AVFormatContext *s, 
AVPacket *pkt)
         }
 #endif
         else if (st->codecpar->codec_id == AV_CODEC_ID_APV && sample->size > 
4) {
-            const uint32_t au_size = avio_rb32(sc->pb);
+            uint32_t au_size = avio_rb32(sc->pb);
+            int explode = !!(mov->fc->error_recognition & AV_EF_EXPLODE);
             if (au_size > sample->size - 4) {
-                av_log(s, AV_LOG_ERROR,
+                av_log(s, explode ? AV_LOG_ERROR : AV_LOG_WARNING,
                        "APV au_size %u exceeds sample body %d\n",
                        au_size, sample->size - 4);
-                return AVERROR_INVALIDDATA;
+                if (explode)
+                    return AVERROR_INVALIDDATA;
+                au_size = sample->size - 4;
             }
             ret = av_get_packet(sc->pb, pkt, au_size);
         } else

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

Reply via email to