Commit 789274dc authored by James Almer's avatar James Almer

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

Should fix ticket #3958.
Reviewed-by: 's avatarJames Zern <jzern@google.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 00d3bb1a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment