lavfi/vf_vpp_qsv: convert to query_func2()

master
Anton Khirnov 2 months ago
parent e5b530f137
commit ab01f0522b
  1. 12
      libavfilter/vf_vpp_qsv.c

@ -932,9 +932,11 @@ static const AVOption vpp_options[] = {
{ NULL } { NULL }
}; };
static int vpp_query_formats(AVFilterContext *ctx) static int vpp_query_formats(const AVFilterContext *ctx,
AVFilterFormatsConfig **cfg_in,
AVFilterFormatsConfig **cfg_out)
{ {
VPPContext *vpp = ctx->priv; const VPPContext *vpp = ctx->priv;
int ret, i = 0; int ret, i = 0;
static const enum AVPixelFormat in_pix_fmts[] = { static const enum AVPixelFormat in_pix_fmts[] = {
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P,
@ -951,7 +953,7 @@ static int vpp_query_formats(AVFilterContext *ctx)
static enum AVPixelFormat out_pix_fmts[4]; static enum AVPixelFormat out_pix_fmts[4];
ret = ff_formats_ref(ff_make_format_list(in_pix_fmts), ret = ff_formats_ref(ff_make_format_list(in_pix_fmts),
&ctx->inputs[0]->outcfg.formats); &cfg_in[0]->formats);
if (ret < 0) if (ret < 0)
return ret; return ret;
@ -968,10 +970,10 @@ static int vpp_query_formats(AVFilterContext *ctx)
out_pix_fmts[i++] = AV_PIX_FMT_NONE; out_pix_fmts[i++] = AV_PIX_FMT_NONE;
return ff_formats_ref(ff_make_format_list(out_pix_fmts), return ff_formats_ref(ff_make_format_list(out_pix_fmts),
&ctx->outputs[0]->incfg.formats); &cfg_out[0]->formats);
} }
DEFINE_QSV_FILTER(vpp, vpp, "VPP", FILTER_QUERY_FUNC(vpp_query_formats)); DEFINE_QSV_FILTER(vpp, vpp, "VPP", FILTER_QUERY_FUNC2(vpp_query_formats));
#endif #endif

Loading…
Cancel
Save