shithub: libvpx

Download patch

ref: 2b1a0b68bf4068f6f014f94e34b49f91c3cb3a50
parent: 231faf91c315c7973f07a1c174ee27eae1056b7a
author: James Zern <jzern@google.com>
date: Mon May 6 07:45:03 EDT 2013

test/tile_independence_test: check decode return

abort on failure

Change-Id: I52882613e466ae57e1ed7f10ca64e25b9724fb61

--- a/test/tile_independence_test.cc
+++ b/test/tile_independence_test.cc
@@ -56,7 +56,13 @@
 
   void UpdateMD5(::libvpx_test::Decoder *dec, const vpx_codec_cx_pkt_t *pkt,
                  ::libvpx_test::MD5 *md5) {
-    dec->DecodeFrame((uint8_t *) pkt->data.frame.buf, pkt->data.frame.sz);
+    const vpx_codec_err_t res =
+        dec->DecodeFrame(reinterpret_cast<uint8_t*>(pkt->data.frame.buf),
+                         pkt->data.frame.sz);
+    if (res != VPX_CODEC_OK) {
+      abort_ = true;
+      ASSERT_EQ(VPX_CODEC_OK, res);
+    }
     const vpx_image_t *img = dec->GetDxData().Next();
     md5->Add(img);
   }