avcodec/libvpxdec: don't check for formats other than i420 when vp9 decoding is disabled

Should fix ticket #3958.

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2014-09-23 19:30:58 -03:00
parent 00d3bb1a07
commit 789274dca8

View 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;