[FFmpeg-cvslog] [ffmpeg] branch master updated. f610b55525 avfilter/vf_libplacebo: fix possible segfault when frame mixing

ffmpeg-git at ffmpeg.org ffmpeg-git at ffmpeg.org
Tue Aug 12 00:22:22 EEST 2025


The branch, master has been updated
       via  f610b55525613b032b79f9c16607364ca07a611e (commit)
      from  13139d6d83e8bdcf8a2c81af14ed2c3e30b5e1c1 (commit)


- Log -----------------------------------------------------------------
commit f610b55525613b032b79f9c16607364ca07a611e
Author:     Niklas Haas <git at haasn.dev>
AuthorDate: Mon Aug 11 09:58:58 2025 +0200
Commit:     Niklas Haas <ffmpeg at haasn.dev>
CommitDate: Mon Aug 11 21:21:55 2025 +0000

    avfilter/vf_libplacebo: fix possible segfault when frame mixing
    
    pl_frame_mix_current() will return NULL if all frames are in the future,
    but when libplacebo is using a frame mixer with a radius greater than 1,
    future frames are expected to already be partially renderered. Instead, use
    pl_frame_mix_nearest(), which is guaranteed to give us a valid frame for any
    nonempty frame mix.
    
    Fixes: 3091bca3edb339a4d2ec8c64e52fa7e67a7d5005

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 135749d3b1..01ce9d56b7 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -928,7 +928,8 @@ static int output_frame(AVFilterContext *ctx, int64_t pts)
         struct pl_frame dummy;
         if (in->qstatus != PL_QUEUE_OK || !in->mix.num_frames)
             continue;
-        const struct pl_frame *cur = pl_frame_mix_current(&in->mix);
+        const struct pl_frame *cur = pl_frame_mix_nearest(&in->mix);
+        av_assert1(cur);
         update_crops(ctx, in, &dummy, target_pts);
         const int x0 = roundf(FFMIN(dummy.crop.x0, dummy.crop.x1)),
                   y0 = roundf(FFMIN(dummy.crop.y0, dummy.crop.y1)),

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

Summary of changes:
 libavfilter/vf_libplacebo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 



More information about the ffmpeg-cvslog mailing list