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/vf_fieldorder.c | |
parent | 50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (diff) | |
download | ffmpeg-59ee9f78b0cc4fb84ae606fa317d8102ad32a627.tar.gz |
lavfi: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'libavfilter/vf_fieldorder.c')
-rw-r--r-- | libavfilter/vf_fieldorder.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index d6875de99f..5e084ac4c8 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -78,15 +78,16 @@ static int query_formats(AVFilterContext *ctx) * a bitstream format, and does not have vertically sub-sampled chroma */ if (ctx->inputs[0]) { formats = NULL; - for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) - if (!( av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL - || av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_BITSTREAM) - && av_pix_fmt_descriptors[pix_fmt].nb_components - && !av_pix_fmt_descriptors[pix_fmt].log2_chroma_h - && (ret = ff_add_format(&formats, pix_fmt)) < 0) { + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + if (!(desc->flags & PIX_FMT_HWACCEL || + desc->flags & PIX_FMT_BITSTREAM) && + desc->nb_components && !desc->log2_chroma_h && + (ret = ff_add_format(&formats, pix_fmt)) < 0) { ff_formats_unref(&formats); return ret; } + } ff_formats_ref(formats, &ctx->inputs[0]->out_formats); ff_formats_ref(formats, &ctx->outputs[0]->in_formats); } |