mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_detelecine: use ff_formats_pixdesc_filter()
This commit is contained in:
parent
bc2632f867
commit
4ae2dfd7ea
@ -124,19 +124,16 @@ static av_cold int init(AVFilterContext *ctx)
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
AVFilterFormats *pix_fmts = NULL;
|
||||
int fmt, ret;
|
||||
AVFilterFormats *formats = NULL;
|
||||
int ret;
|
||||
|
||||
for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
|
||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
|
||||
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
|
||||
desc->flags & AV_PIX_FMT_FLAG_PAL ||
|
||||
desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
|
||||
(ret = ff_add_format(&pix_fmts, fmt)) < 0)
|
||||
ret = ff_formats_pixdesc_filter(&formats, 0,
|
||||
AV_PIX_FMT_FLAG_BITSTREAM |
|
||||
AV_PIX_FMT_FLAG_PAL |
|
||||
AV_PIX_FMT_FLAG_HWACCEL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ff_set_common_formats(ctx, pix_fmts);
|
||||
return ff_set_common_formats(ctx, formats);
|
||||
}
|
||||
|
||||
static int config_input(AVFilterLink *inlink)
|
||||
|
Loading…
Reference in New Issue
Block a user