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

Git pushed a commit to branch master
in repository ffmpeg.

commit 9f60ec3010a8d93d15f6afd4f436cae82726814b
Author:     Philip Langdale <[email protected]>
AuthorDate: Sun Jun 28 15:37:21 2026 -0700
Commit:     Philip Langdale <[email protected]>
CommitDate: Sat Aug 29 16:38:05 2026 -0700

    avfilter/fruc_vulkan: fall back to a plain timebase when reduction 
degenerates
    
    The output timebase is derived, as in vf_fps / vf_framerate, by reducing the
    source timebase against the requested frame rate. That reduction can 
collapse to
    a zero time base - av_reduce() bounds its result, so the numerator can 
underflow
    to zero, leaving 0/1 - when the source timebase shares no useful factors 
with
    the requested rate, leaving an unusable output timebase that breaks the
    downstream PTS rescaling.
    
    Detect the degenerate result and fall back to the plain 1/fps timebase 
derived
    directly from the requested rate, so config_output() always yields a valid
    timebase.
---
 libavfilter/vf_fruc_vulkan.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libavfilter/vf_fruc_vulkan.c b/libavfilter/vf_fruc_vulkan.c
index 2118e4eced..c8e32a3b08 100644
--- a/libavfilter/vf_fruc_vulkan.c
+++ b/libavfilter/vf_fruc_vulkan.c
@@ -464,6 +464,17 @@ static int config_output(AVFilterLink *outlink)
                              (int64_t)s->srce_time_base.den * 
s->dest_frame_rate.den ),
                       (int64_t)s->srce_time_base.den * s->dest_frame_rate.num, 
INT_MAX);
 
+    /* The source-timebase-derived reduction above can collapse to a zero time
+     * base (av_reduce() bounds its result, so the numerator can underflow to
+     * zero, leaving 0/1) when the source timebase shares no useful factors 
with
+     * the requested rate, which would make the output timebase unusable. Fall
+     * back to the plain 1/fps timebase in that case so a valid timebase is
+     * always produced. */
+    if (!s->dest_time_base.num || !s->dest_time_base.den) {
+        exact = av_reduce(&s->dest_time_base.num, &s->dest_time_base.den,
+                          s->dest_frame_rate.den, s->dest_frame_rate.num, 
INT_MAX);
+    }
+
     av_log(ctx, AV_LOG_INFO,
            "time base:%u/%u -> %u/%u exact:%d\n",
            s->srce_time_base.num, s->srce_time_base.den,

-- 
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