]> granicus.if.org Git - libvpx/commitdiff
test/tile_independence_test: check decode return
authorJames Zern <jzern@google.com>
Mon, 6 May 2013 18:45:03 +0000 (11:45 -0700)
committerJames Zern <jzern@google.com>
Mon, 6 May 2013 18:55:15 +0000 (11:55 -0700)
abort on failure

Change-Id: I52882613e466ae57e1ed7f10ca64e25b9724fb61

test/tile_independence_test.cc

index 711d0bd45e82fe00a543736552147aad93f372f6..9633ed756892243a20c5bcf0b75aee9afbb1facf 100644 (file)
@@ -56,7 +56,13 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
 
   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);
   }