Commit 882d331302 for ffmpeg

commit 882d3313028897abefc0d236c8769267c528ec85
Author: Qingzheng Li <s@qwqlog.com>
Date:   Thu Aug 6 01:23:33 2026 +0800

    fate/filter-video: test invalid swaprect expressions

    Cover negative and sub-unit dimensions, as well as finite out-of-range
    and infinite coordinates.

    Require the expected EINVAL process status and diagnostic so a crash does
    not satisfy the rejection tests.

    Based-on-patch-by: un-tag <roosevelthonaker@gmail.com>

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 4ce8e06c37..b595b9f1e0 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -393,6 +393,25 @@ fate-filter-swaprect: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf swaprect

 FATE_FILTER_VSYNTH_PGMYUV-$(CONFIG_SWAPRECT_FILTER) += $(FATE_SWAPRECT)

+FATE_FILTER-$(call ALLYES, COLOR_FILTER LAVFI_INDEV SWAPRECT_FILTER \
+                              WRAPPED_AVFRAME_DECODER WRAPPED_AVFRAME_ENCODER \
+                              NULL_MUXER) += fate-filter-swaprect-invalid-size \
+                                             fate-filter-swaprect-invalid-fractional-size \
+                                             fate-filter-swaprect-invalid-coordinate \
+                                             fate-filter-swaprect-nonfinite-coordinate
+fate-filter-swaprect-invalid-size: CMD = run $(FFMPEG) -nostdin -hide_banner -f lavfi -i "color=c=black:s=16x16:r=1" -vf "swaprect=w=-1:h=1:x1=0:y1=0:x2=1:y2=0" -frames:v 1 -f null none ; ret=$$?; test $$ret -eq 234
+fate-filter-swaprect-invalid-size: CMP = grep
+fate-filter-swaprect-invalid-size: REF = Rectangle dimensions must be positive
+fate-filter-swaprect-invalid-fractional-size: CMD = run $(FFMPEG) -nostdin -hide_banner -f lavfi -i "color=c=black:s=16x16:r=1" -vf "swaprect=w=0.5:h=1:x1=0:y1=0:x2=1:y2=0" -frames:v 1 -f null none ; ret=$$?; test $$ret -eq 234
+fate-filter-swaprect-invalid-fractional-size: CMP = grep
+fate-filter-swaprect-invalid-fractional-size: REF = Rectangle dimensions must be positive
+fate-filter-swaprect-invalid-coordinate: CMD = run $(FFMPEG) -nostdin -hide_banner -f lavfi -i "color=c=black:s=16x16:r=1" -vf "swaprect=w=1:h=1:x1=1e100:y1=0:x2=1:y2=0" -frames:v 1 -f null none ; ret=$$?; test $$ret -eq 234
+fate-filter-swaprect-invalid-coordinate: CMP = grep
+fate-filter-swaprect-invalid-coordinate: REF = Rectangle expression result is not representable as an integer
+fate-filter-swaprect-nonfinite-coordinate: CMD = run $(FFMPEG) -nostdin -hide_banner -f lavfi -i "color=c=black:s=16x16:r=1" -vf "swaprect=w=1:h=1:x1=1/0:y1=0:x2=1:y2=0" -frames:v 1 -f null none ; ret=$$?; test $$ret -eq 234
+fate-filter-swaprect-nonfinite-coordinate: CMP = grep
+fate-filter-swaprect-nonfinite-coordinate: REF = Rectangle expression result is not representable as an integer
+
 FATE_FILTER_VSYNTH_PGMYUV-$(CONFIG_TBLEND_FILTER) += fate-filter-tblend
 fate-filter-tblend: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf tblend=all_mode=difference128