Commit 9d662af7ef for ffmpeg
commit 9d662af7efb1dfe154feafdf47da969f0f42b6d4
Author: Zhao Zhili <quinkblack@foxmail.com>
Date: Wed Oct 14 00:10:13 2026 +0800
avfilter/vf_signature: fix error check of get_frame_filename()
It returns a negative AVERROR code on failure, not -1.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c
index b655b08a87..0bc776a38c 100644
--- a/libavfilter/vf_signature.c
+++ b/libavfilter/vf_signature.c
@@ -726,7 +726,7 @@ static av_cold int init(AVFilterContext *ctx)
}
/* check filename */
- if (sic->nb_inputs > 1 && strlen(sic->filename) > 0 && get_frame_filename(tmp, sizeof(tmp), sic->filename, 0) == -1) {
+ if (sic->nb_inputs > 1 && strlen(sic->filename) > 0 && get_frame_filename(tmp, sizeof(tmp), sic->filename, 0) < 0) {
av_log(ctx, AV_LOG_ERROR, "The filename must contain %%d or %%0nd, if you have more than one input.\n");
return AVERROR(EINVAL);
}