Merge "vpx_codec_dec_init: check that the iface is a decoder"

This commit is contained in:
John Koleszar 2011-03-21 09:12:58 -07:00 committed by Code Review
commit 577910b464

View File

@ -36,6 +36,8 @@ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
res = VPX_CODEC_INCAPABLE;
else if ((flags & VPX_CODEC_USE_POSTPROC) && !(iface->caps & VPX_CODEC_CAP_POSTPROC))
res = VPX_CODEC_INCAPABLE;
else if (!(iface->caps & VPX_CODEC_CAP_DECODER))
res = VPX_CODEC_INCAPABLE;
else
{
memset(ctx, 0, sizeof(*ctx));