avfilter/vf_fieldorder: Simplify setting common pixel formats

by using ff_set_common_formats().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-08-15 08:01:17 +02:00
parent c8b1c9f97a
commit 4049b34aca
1 changed files with 1 additions and 3 deletions

View File

@ -58,9 +58,7 @@ static int query_formats(AVFilterContext *ctx)
(ret = ff_add_format(&formats, pix_fmt)) < 0)
return ret;
}
if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0 ||
(ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
return ret;
return ff_set_common_formats(ctx, formats);
}
return 0;