From 4af33ec41801b9834fbe6772f9c1e53c48e0cd0d Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 6 Mar 2026 00:50:53 +0100 Subject: [PATCH] swscale/graph: ensure intermediate buffers have extra line padding This basically guarantees that optimized packed routines have enough space to write a few bytes past the end of the line. Signed-off-by: Niklas Haas --- libswscale/graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index 4363862d1e..978be35203 100644 --- a/libswscale/graph.c +++ b/libswscale/graph.c @@ -63,7 +63,7 @@ static int frame_alloc_planes(AVFrame *dst) return ret; const int align = av_cpu_max_align(); - const int aligned_w = FFALIGN(dst->width, align); + const int aligned_w = FFALIGN(dst->width + 1, align); /* add space for over-write */ ret = av_image_fill_linesizes(dst->linesize, dst->format, aligned_w); if (ret < 0) return ret;