Unified · Split
| @@ -30,17 +30,12 @@ · 29 unmodified lines | |||
| 30 | static int query_formats(AVFilterContext *ctx) | 30 | static int query_formats(AVFilterContext *ctx) |
| 31 | { | 31 | { |
| 32 | AVFilterFormats *formats = NULL; | 32 | AVFilterFormats *formats = NULL; |
| 33 | int fmt; | 33 | int ret; |
| 34 | |||
| 35 | for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) { | ||
| 36 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); | ||
| 37 | int ret; | ||
| 38 | if (desc->flags & AV_PIX_FMT_FLAG_HWACCEL) | ||
| 39 | continue; | ||
| 40 | if ((ret = ff_add_format(&formats, fmt)) < 0) | ||
| 41 | return ret; | ||
| 42 | } | ||
| 43 | 34 | ||
| 35 | ret = ff_formats_pixdesc_filter(&formats, 0, | ||
| 36 | AV_PIX_FMT_FLAG_HWACCEL); | ||
| 37 | if (ret < 0) | ||
| 38 | return ret; | ||
| 44 | return ff_set_common_formats(ctx, formats); | 39 | return ff_set_common_formats(ctx, formats); |
| 45 | } | 40 | } |
| 46 | 41 | ||