From 59ee9f78b0cc4fb84ae606fa317d8102ad32a627 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 6 Oct 2012 13:29:37 +0200 Subject: lavfi: do not use av_pix_fmt_descriptors directly. --- libavfilter/formats.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libavfilter/formats.c') diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 7737f177db..3b890d2bda 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -213,10 +213,12 @@ AVFilterFormats *ff_all_formats(enum AVMediaType type) int num_formats = type == AVMEDIA_TYPE_VIDEO ? AV_PIX_FMT_NB : type == AVMEDIA_TYPE_AUDIO ? AV_SAMPLE_FMT_NB : 0; - for (fmt = 0; fmt < num_formats; fmt++) + for (fmt = 0; fmt < num_formats; fmt++) { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); if ((type != AVMEDIA_TYPE_VIDEO) || - (type == AVMEDIA_TYPE_VIDEO && !(av_pix_fmt_descriptors[fmt].flags & PIX_FMT_HWACCEL))) + (type == AVMEDIA_TYPE_VIDEO && !(desc->flags & PIX_FMT_HWACCEL))) ff_add_format(&ret, fmt); + } return ret; } -- cgit v1.2.3