Modified vpxdec loop
to work like vpxenc. This is required for the frame-based
multithreading.
Change-Id: I338ae9c7d52b0541f3536cc033d6b89f00866e74
diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c
index 90a1754..45cf385 100644
--- a/vp8/vp8_dx_iface.c
+++ b/vp8/vp8_dx_iface.c
@@ -659,7 +659,7 @@
/* iter acts as a flip flop, so an image is only returned on the first
* call to get_frame.
*/
- if (!(*iter))
+ if (!(*iter) && ctx->yv12_frame_buffers.pbi[0])
{
YV12_BUFFER_CONFIG sd;
int64_t time_stamp = 0, time_end_stamp = 0;
@@ -943,10 +943,10 @@
{
int *corrupted = va_arg(args, int *);
+ VP8D_COMP *pbi = (VP8D_COMP *)ctx->yv12_frame_buffers.pbi[0];
- if (corrupted)
+ if (corrupted && pbi)
{
- VP8D_COMP *pbi = (VP8D_COMP *)ctx->yv12_frame_buffers.pbi[0];
*corrupted = pbi->common.frame_to_show->corrupted;
return VPX_CODEC_OK;