shithub: libvpx

Download patch

ref: c4d56257f9adc0713ffb7f19db1c230514fa4791
parent: 0616fa6e87c131073bd7c54b65f4bb8a6d2e8ecb
author: James Zern <[email protected]>
date: Tue Apr 26 16:15:15 EDT 2016

vp9_ethread_test: avoid crash when decoder is unavailable

Change-Id: If45b8931771d50990b78a5aa860f372eb0430cf4

--- a/test/vp9_ethread_test.cc
+++ b/test/vp9_ethread_test.cc
@@ -82,6 +82,7 @@
   }
 
   virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
+#if CONFIG_VP9_DECODER
     const vpx_codec_err_t res = decoder_->DecodeFrame(
         reinterpret_cast<uint8_t*>(pkt->data.frame.buf), pkt->data.frame.sz);
     if (res != VPX_CODEC_OK) {
@@ -95,6 +96,9 @@
       md5_res.Add(img);
       md5_.push_back(md5_res.Get());
     }
+#else
+    ASSERT_EQ(NULL, decoder_);
+#endif
   }
 
   bool encoder_initialized_;