1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avfilter/vf_telecine: use ff_formats_pixdesc_filter()

This commit is contained in:
Paul B Mahol 2021-01-16 21:20:31 +01:00
parent 737bb01540
commit 6baed9ce03

View File

@ -101,19 +101,16 @@ static av_cold int init(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx)
{ {
AVFilterFormats *pix_fmts = NULL; AVFilterFormats *formats = NULL;
int fmt, ret; int ret;
for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) { ret = ff_formats_pixdesc_filter(&formats, 0,
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); AV_PIX_FMT_FLAG_BITSTREAM |
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL || AV_PIX_FMT_FLAG_PAL |
desc->flags & AV_PIX_FMT_FLAG_PAL || AV_PIX_FMT_FLAG_HWACCEL);
desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) && if (ret < 0)
(ret = ff_add_format(&pix_fmts, fmt)) < 0)
return ret; return ret;
} return ff_set_common_formats(ctx, formats);
return ff_set_common_formats(ctx, pix_fmts);
} }
static int config_input(AVFilterLink *inlink) static int config_input(AVFilterLink *inlink)