From: "Ayose C. via ffmpeg-devel" <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: "Ayose C." <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] Fix fate-filter-drawvg-video in MINGW64. (PR #21030)
Date: Thu, 27 Nov 2025 02:45:50 -0000
Message-ID: <176421155109.39.6471860286356694912@2cb04c0e5124> (raw)
PR #21030 opened by Ayose C. (ayosec)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21030
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21030.patch
This pull-request is an alternative to #21008.
The test `fate-filter-drawvg-video` is failing on Windows when `SRC_PATH` contains the character `:` ([example](https://fate.ffmpeg.org/report.cgi?time=20251126171129&slot=msys2-mingw64)).
I tried to find a way to escape the value that could work in both systems (Unix/Windows), but the way `tests/fate-run.sh` moves the command-line arguments between functions (a mix of `eval`, `$*`, and `$@`) makes very difficult to work with characters that can be interpreted by the shell (like `\` or `'`).
Instead of escaping the value, the solution implemented is to copy the `drawvg.lines` file to the `tests/data` directory (which already has temp files), so the value for `file` is a fixed string with no problematic characters.
### Testing
I'm not familiar with Windows, so I don't know if this is the correct way to test it.
1. With MSYS2 3.6.4, GCC-MINGW 15.2.
```console
$ pacman -Qe
...
mingw-w64-x86_64-gcc 15.2.0-8
msys2-runtime 3.6.4-1
```
2. A copy of the `master` branch is in `/tmp/ffmpeg-drawvg`. FFmpeg is built in `/tmp/build0`:
```console
$ gcc -dumpmachine
x86_64-w64-mingw32
$ mkdir /tmp/build0
$ cd /tmp/build0
$ E:/msys64/tmp/ffmpeg-drawvg/configure --enable-cairo --disable-x86asm
...
```
3. Before the patch in this pull-request I can reproduce [the same error](https://fate.ffmpeg.org/log.cgi?slot=msys2-mingw64&log=test&time=20251126171129#:~:text=tiltandshift%2D444%0ATEST-,filter%2Ddrawvg%2Dvideo,-%2D%2D%2D%20/d/a/FFmpeg):
```console
$ make fate-filter-drawvg-video V=1
...
+++ tests/data/fate/filter-drawvg-video
@@ -1 +1 @@
-drawvg-video caa7642950ab2fb1367bd28c287f31bd
+drawvg-video
...
[AVFilterGraph @ 00000214b5882940] No option name near '/msys64/tmp/ffmpeg-drawvg/tests/ref/lavf/drawvg.lines'
[AVFilterGraph @ 00000214b5882940] Error parsing a filter description around:
[AVFilterGraph @ 00000214b5882940] Error parsing filterchain 'scale,format=bgr0,drawvg=file=E:/msys64/tmp/ffmpeg-drawvg/tests/ref/lavf/drawvg.lines' around:
```
4. After the patch:
```console
$ make fate-filter-drawvg-video V=1
cp /tmp/ffmpeg-drawvg/tests/ref/lavf/drawvg.lines tests/data/fate/drawvg.lines
TEST filter-drawvg-video
/tmp/ffmpeg-drawvg/tests/fate-run.sh fate-filter-drawvg-video "" "" "/tmp/build0" 'video_filter scale,format=bgr0,drawvg=file=tests/data/fate/drawvg.lines' '' '' '' '1' '' '' '' '' '' '' '' '' '' ''
/tmp/build0/ffmpeg.exe -nostdin -nostats -noauto_conversion_filters -cpuflags all -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact -threads 1 -f image2 -vcodec pgmyuv -hwaccel none -threads 1 -thread_type frame+slice -i /tmp/build0/tests/vsynth1/%02d.pgm -flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact -threads 1 -dct fastint -vf scale,format=bgr0,drawvg=file=tests/data/fate/drawvg.lines -vcodec rawvideo -frames:v 5 -f nut md5:
```
Without `V=1`:
```console
$ make fate-filter-drawvg-{interpreter,video}
TEST filter-drawvg-interpreter
TEST filter-drawvg-video
$ echo $?
0
```
>From fbe28941af52da893257168fee3196fd83be8885 Mon Sep 17 00:00:00 2001
From: Ayose <ayosec@gmail.com>
Date: Wed, 26 Nov 2025 22:00:39 +0000
Subject: [PATCH] tests/fate-filter-drawvg-video: copy drawvg.lines file to
tests/data.
If the SRC_PATH variable contains certain characters (like a `:`, which may
happen when FATE is executed on Windows), the value for the `file` option is
broken, so `make fate-filter-drawvg-video` always fails.
The solution in this commit is to copy the `drawvg.lines` to the `tests/data`
directory (which already has temp files), so the value for `file` is a fixed
string with no problematic characters.
Signed-off-by: Ayose <ayosec@gmail.com>
---
tests/fate/filter-video.mak | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 3fe7f10476..087ba8d9cd 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -609,7 +609,10 @@ fate-filter-tiltandshift-410: CMD = framecrc -c:v pgmyuv -i $(SRC) -flags +bitex
fate-filter-tiltandshift-422: CMD = framecrc -c:v pgmyuv -i $(SRC) -flags +bitexact -vf scale=sws_flags=+accurate_rnd+bitexact,format=yuv422p,tiltandshift
fate-filter-tiltandshift-444: CMD = framecrc -c:v pgmyuv -i $(SRC) -flags +bitexact -vf scale=sws_flags=+accurate_rnd+bitexact,format=yuv444p,tiltandshift
-DRAWVG_SCRIPT_LINES = $(SRC_PATH)/tests/ref/lavf/drawvg.lines
+DRAWVG_SCRIPT_LINES = tests/data/fate/drawvg.lines
+$(DRAWVG_SCRIPT_LINES): $(SRC_PATH)/tests/ref/lavf/drawvg.lines
+ $(M)cp $< $@
+
FATE_FILTER_VSYNTH_VIDEO_FILTER-$(CONFIG_DRAWVG_FILTER) += fate-filter-drawvg-video
fate-filter-drawvg-video: $(DRAWVG_SCRIPT_LINES)
fate-filter-drawvg-video: CMD = video_filter scale,format=bgr0,drawvg=file=$(DRAWVG_SCRIPT_LINES)
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2025-11-27 2:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176421155109.39.6471860286356694912@2cb04c0e5124 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git