summaryrefslogtreecommitdiff
path: root/vp8/vp8_dx_iface.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2013-06-07 12:39:03 -0400
committerScott LaVarnway <slavarnway@google.com>2013-06-07 12:39:03 -0400
commitc3ae212e80f599c2cee40301c7b619383db33896 (patch)
treee5150086192c011a9db4c35883879791081e3694 /vp8/vp8_dx_iface.c
parentb71542dc13ea959ed2b42dab6ee9dfbb3444e274 (diff)
downloadlibvpx-c3ae212e80f599c2cee40301c7b619383db33896.tar
libvpx-c3ae212e80f599c2cee40301c7b619383db33896.tar.gz
libvpx-c3ae212e80f599c2cee40301c7b619383db33896.tar.bz2
libvpx-c3ae212e80f599c2cee40301c7b619383db33896.zip
Modified vpxdec loop
to work like vpxenc. This is required for the frame-based multithreading. Change-Id: I338ae9c7d52b0541f3536cc033d6b89f00866e74
Diffstat (limited to 'vp8/vp8_dx_iface.c')
-rw-r--r--vp8/vp8_dx_iface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c
index 90a175436..45cf3859e 100644
--- a/vp8/vp8_dx_iface.c
+++ b/vp8/vp8_dx_iface.c
@@ -659,7 +659,7 @@ static vpx_image_t *vp8_get_frame(vpx_codec_alg_priv_t *ctx,
/* 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 @@ static vpx_codec_err_t vp8_get_frame_corrupted(vpx_codec_alg_priv_t *ctx,
{
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;