lavfi/vf_tpad: convert to query_func2()

master
Anton Khirnov 2 months ago
parent ce5aa74045
commit ef4913e30d
  1. 14
      libavfilter/vf_tpad.c

@ -76,13 +76,17 @@ static int needs_drawing(const TPadContext *s) {
);
}
static int query_formats(AVFilterContext *ctx)
static int query_formats(const AVFilterContext *ctx,
AVFilterFormatsConfig **cfg_in,
AVFilterFormatsConfig **cfg_out)
{
TPadContext *s = ctx->priv;
const TPadContext *s = ctx->priv;
if (needs_drawing(s))
return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
return ff_set_common_formats2(ctx, cfg_in, cfg_out,
ff_draw_supported_pixel_formats(0));
return ff_set_common_formats(ctx, ff_all_formats(AVMEDIA_TYPE_VIDEO));
return ff_set_common_formats2(ctx, cfg_in, cfg_out,
ff_all_formats(AVMEDIA_TYPE_VIDEO));
}
static int activate(AVFilterContext *ctx)
@ -240,5 +244,5 @@ const AVFilter ff_vf_tpad = {
.uninit = uninit,
FILTER_INPUTS(tpad_inputs),
FILTER_OUTPUTS(ff_video_default_filterpad),
FILTER_QUERY_FUNC(query_formats),
FILTER_QUERY_FUNC2(query_formats),
};

Loading…
Cancel
Save