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;