shithub: libvpx

Download patch

ref: 577910b4649076473e9477a1119e47a885fcfb99
parent: 73065b67e42c6330802b96ccf8da507225581e2c
parent: 2fced87e75212f43787f7114de5317c35e77a965
author: John Koleszar <jkoleszar@google.com>
date: Mon Mar 21 05:12:58 EDT 2011

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

--- a/vpx/src/vpx_decoder.c
+++ b/vpx/src/vpx_decoder.c
@@ -36,6 +36,8 @@
         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));
--