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 be387f252d avformat/mtv: reject a zero video frame rate
be387f252d is described below

commit be387f252de068a38e3b0f5f40404ec55c14578c
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Sep 7 01:42:07 2026 +0000
Commit:     michaelni <[email protected]>
CommitDate: Fri Sep 18 14:29:23 2026 +0000

    avformat/mtv: reject a zero video frame rate
    
    The integer frame-rate calculation can produce zero even when 
audio_subsegments is nonzero. Reject such headers before creating streams 
instead of passing a zero denominator to avpriv_set_pts_info() and retaining 
the default video time base.
    
    Fixes #23451.
    
    Assisted-by: Fairy
---
 libavformat/mtv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index c888443b7a..c28e793286 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -156,7 +156,10 @@ static int mtv_read_header(AVFormatContext *s)
         mtv->img_segment_size;
     mtv->video_fps         = (mtv->audio_br / 4) / audio_subsegments;
 
-    // FIXME Add sanity check here
+    if (!mtv->video_fps) {
+        av_log(s, AV_LOG_ERROR, "Invalid video frame rate\n");
+        return AVERROR_INVALIDDATA;
+    }
 
     // all systems go! init decoders
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to