avcodec/libvpxdec: don't check for formats other than i420 when vp9 decoding is disabled
authorJames Almer <jamrial@gmail.com>
Tue, 23 Sep 2014 22:30:58 +0000 (19:30 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 23 Sep 2014 22:50:28 +0000 (19:50 -0300)
Should fix ticket #3958.

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/libvpxdec.c

index 8312460..65d391f 100644 (file)
@@ -68,6 +68,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img) {
         case VPX_IMG_FMT_I420:
             avctx->pix_fmt = AV_PIX_FMT_YUV420P;
             return 0;
+#if CONFIG_LIBVPX_VP9_DECODER
         case VPX_IMG_FMT_I422:
             avctx->pix_fmt = AV_PIX_FMT_YUV422P;
             return 0;
@@ -105,6 +106,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img) {
             } else {
                 return AVERROR_INVALIDDATA;
             }
+#endif
 #endif
         default:
             return AVERROR_INVALIDDATA;