From d1b14b4f0b4862675af1568c5ef24e77014fa0d1 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 18 Nov 2022 16:11:01 +0100 Subject: [PATCH] avfilter/vf_libplacebo: suppress warning on older libplacebo Move the declaration before the code. --- libavfilter/vf_libplacebo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index fa9a7675d1..65865b7811 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -524,6 +524,7 @@ static int libplacebo_query_format(AVFilterContext *ctx) RET(init_vulkan(ctx)); while ((desc = av_pix_fmt_desc_next(desc))) { + enum AVPixelFormat pixfmt = av_pix_fmt_desc_get_id(desc); #if PL_API_VER < 232 // Older libplacebo can't handle >64-bit pixel formats, so safe-guard @@ -532,7 +533,6 @@ static int libplacebo_query_format(AVFilterContext *ctx) continue; #endif - enum AVPixelFormat pixfmt = av_pix_fmt_desc_get_id(desc); if (pl_test_pixfmt(s->gpu, pixfmt)) { if ((err = ff_add_format(&in_fmts, pixfmt)) < 0) return err;