summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fieldorder.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-27 03:02:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-27 03:02:37 +0200
commitcdf6a9441ded7df881de388229c26354e42b0872 (patch)
tree12bbc4d10f7a883a48eb9679e6149114f44d489a /libavfilter/vf_fieldorder.c
parentde5ec08825918401b604d13c4c49bf6bef01ceb3 (diff)
parenta7d070acb55c3ebbdd5e93e3366f32865732b8a3 (diff)
Merge commit 'a7d070acb55c3ebbdd5e93e3366f32865732b8a3'
* commit 'a7d070acb55c3ebbdd5e93e3366f32865732b8a3': vf_fieldorder: avoid using AV_PIX_FMT_NB Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fieldorder.c')
-rw-r--r--libavfilter/vf_fieldorder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index 36189af270..5cc612ccd0 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -47,9 +47,10 @@ static int query_formats(AVFilterContext *ctx)
/** accept any input pixel format that is not hardware accelerated, not
* a bitstream format, and does not have vertically sub-sampled chroma */
if (ctx->inputs[0]) {
+ const AVPixFmtDescriptor *desc = NULL;
formats = NULL;
- for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) {
- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
+ while ((desc = av_pix_fmt_desc_next(desc))) {
+ pix_fmt = av_pix_fmt_desc_get_id(desc);
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
desc->flags & AV_PIX_FMT_FLAG_PAL ||
desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&