summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fieldorder.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-12 17:04:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-12 17:04:58 +0200
commit13afee951a49964abb6d3e2d11644ac9d5ded2c7 (patch)
treeba98a70ac6f80dea08f21badfbbb64319541d826 /libavfilter/vf_fieldorder.c
parentaf7dd79a323090b14a7fb9ef24a3f6a24dc6d2db (diff)
parent59ee9f78b0cc4fb84ae606fa317d8102ad32a627 (diff)
Merge commit '59ee9f78b0cc4fb84ae606fa317d8102ad32a627'
* commit '59ee9f78b0cc4fb84ae606fa317d8102ad32a627': lavfi: do not use av_pix_fmt_descriptors directly. Conflicts: libavfilter/buffersrc.c libavfilter/drawutils.c libavfilter/filtfmts.c libavfilter/vf_ass.c libavfilter/vf_boxblur.c libavfilter/vf_drawtext.c libavfilter/vf_lut.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fieldorder.c')
-rw-r--r--libavfilter/vf_fieldorder.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index a98eb825ca..cc47e5b7f2 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);
}