diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c index 0b156772c8..73449147ea 100644 --- a/libavfilter/vf_tpad.c +++ b/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), };