diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-10-06 13:29:37 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-10-12 12:45:39 +0200 |
commit | 59ee9f78b0cc4fb84ae606fa317d8102ad32a627 (patch) | |
tree | 253bd434e8b7416d62d8d5f16f1f443cf05c7bd4 /libavfilter/formats.c | |
parent | 50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (diff) | |
download | ffmpeg-59ee9f78b0cc4fb84ae606fa317d8102ad32a627.tar.gz |
lavfi: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r-- | libavfilter/formats.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |