Merge commit '862f33c10ea38ea49fa4188725df5e5246dbd1d8'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 27 May 2014 00:54:58 +0000 (02:54 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 May 2014 00:54:58 +0000 (02:54 +0200)
* commit '862f33c10ea38ea49fa4188725df5e5246dbd1d8':
  vf_scale: use the pixfmt descriptor API

Conflicts:
libavfilter/vf_scale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavfilter/vf_scale.c

@@@ -189,9 -134,11 +192,11 @@@ static int query_formats(AVFilterContex
          ff_formats_ref(formats, &ctx->inputs[0]->out_formats);
      }
      if (ctx->outputs[0]) {
+         const AVPixFmtDescriptor *desc = NULL;
          formats = NULL;
-         for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
+         while ((desc = av_pix_fmt_desc_next(desc))) {
+             pix_fmt = av_pix_fmt_desc_get_id(desc);
 -            if ((sws_isSupportedOutput(pix_fmt) ||
 +            if ((sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8 ||
                   sws_isSupportedEndiannessConversion(pix_fmt))
                  && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
                  ff_formats_unref(&formats);