History

avfilter/vf_il: use ff_formats_pixdesc_filter()

Paul B Mahol committed 5 years ago

Commit 9beee831 parent c590ff11 file · +6 −9Browse files

Unified · Split

libavfilter/vf_il.c+6−9
@@ -84,16 +84,13 @@ AVFILTER_DEFINE_CLASS(il); · 83 unmodified lines
8484 static int query_formats(AVFilterContext *ctx)
8585 {
8686 AVFilterFormats *formats = NULL;
87− int fmt, ret;
88−
89− for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
90− const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
91− if (!(desc->flags & AV_PIX_FMT_FLAG_PAL) &&
92− !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL) &&
93− (ret = ff_add_format(&formats, fmt)) < 0)
94− return ret;
95− }
87+ int ret;
9688
89+ ret = ff_formats_pixdesc_filter(&formats, 0,
90+ AV_PIX_FMT_FLAG_PAL |
91+ AV_PIX_FMT_FLAG_HWACCEL);
92+ if (ret < 0)
93+ return ret;
9794 return ff_set_common_formats(ctx, formats);
9895 }
9996

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t