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 c098b07035 avformat/movenc: initialize all tracks
c098b07035 is described below

commit c098b0703572b5d2423e4281901d89e2c222dcf0
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Jun 17 21:11:26 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Thu Jun 18 12:04:39 2026 +0000

    avformat/movenc: initialize all tracks
    
    Fixes: NULL pointer dereference
    
    As a sideeffect this also sets the timescale correctly if an
    intermediate matches MOV_TIMESCALE_Q, the previous code stoped
    in that case as it could not distinguish it from the overflow detection
    
    Regression since: 51f5f60443
    
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/movenc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 7690819232..7c9dbb29f7 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -8429,10 +8429,11 @@ static int mov_init(AVFormatContext *s)
             track->par = st->codecpar;
         }
 
-        movie_timescale = av_gcd_q(movie_timescale, st->time_base, INT_MAX, 
MOV_TIMESCALE_Q);
-        if (!av_cmp_q(movie_timescale, MOV_TIMESCALE_Q))
-            break;
+        movie_timescale = av_gcd_q(movie_timescale, st->time_base, INT_MAX, 
(AVRational){1,0});
     }
+    if (!movie_timescale.den)
+        movie_timescale = MOV_TIMESCALE_Q;
+
     if (!mov->movie_timescale)
         mov->movie_timescale = FFMAX(movie_timescale.den, MOV_TIMESCALE);
 

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

Reply via email to