Unified · Split
| @@ -84,16 +84,13 @@ AVFILTER_DEFINE_CLASS(il); · 83 unmodified lines | |||
| 84 | static int query_formats(AVFilterContext *ctx) | 84 | static int query_formats(AVFilterContext *ctx) |
| 85 | { | 85 | { |
| 86 | AVFilterFormats *formats = NULL; | 86 | AVFilterFormats *formats = NULL; |
| 87 | int fmt, ret; | 87 | int 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 | } | ||
| 96 | 88 | ||
| 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; | ||
| 97 | return ff_set_common_formats(ctx, formats); | 94 | return ff_set_common_formats(ctx, formats); |
| 98 | } | 95 | } |
| 99 | 96 | ||