1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-14 22:22:59 +02:00

avfilter/vf_rotate: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 17:45:52 +02:00
parent 6b2b765ec9
commit 3f1f518734

View File

@ -132,8 +132,6 @@ static av_cold void uninit(AVFilterContext *ctx)
rot->angle_expr = NULL;
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA,
@ -157,9 +155,6 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static double get_rotated_w(void *opaque, double angle)
{
RotContext *rot = opaque;
@ -604,7 +599,7 @@ const AVFilter ff_vf_rotate = {
.process_command = process_command,
FILTER_INPUTS(rotate_inputs),
FILTER_OUTPUTS(rotate_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS_ARRAY(pix_fmts),
.priv_class = &rotate_class,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
};