PR #24609 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24609 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24609.patch
Found-by: zhang xingxing Fixes: float division by 0 Fixes: WgQdanA8nq8x Fixes: swarm-Division-by-zero-in-hue-rotation-with-zero-weights-bda2e7 >From 68b662f28447221b3756d8d878b12c7f6a47d87f Mon Sep 17 00:00:00 2001 From: zhang xingxing <[email protected]> Date: Mon, 21 Sep 2026 06:10:49 +0200 Subject: [PATCH] avfilter/vf_huesaturation: skip the luminance shear when the luminance vector is zero Found-by: zhang xingxing Fixes: float division by 0 Fixes: WgQdanA8nq8x Fixes: swarm-Division-by-zero-in-hue-rotation-with-zero-weights-bda2e7 --- libavfilter/vf_huesaturation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_huesaturation.c b/libavfilter/vf_huesaturation.c index 6a4aadeee1..6fdb39bafb 100644 --- a/libavfilter/vf_huesaturation.c +++ b/libavfilter/vf_huesaturation.c @@ -321,8 +321,8 @@ static void hue_rotate_matrix(float matrix[4][4], float rotation, y_rotate_matrix(matrix, yrs, yrc); transform_point(matrix, rlw, glw, blw, &lx, &ly, &lz); - zsx = lx / lz; - zsy = ly / lz; + zsx = lz ? lx / lz : 0.f; + zsy = lz ? ly / lz : 0.f; z_shear_matrix(matrix, zsx, zsy); zrs = sinf(rotation * M_PI / 180.f); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
