summaryrefslogtreecommitdiff
path: root/vp8/vp8_dx_iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/vp8_dx_iface.c')
-rw-r--r--vp8/vp8_dx_iface.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c
index f768b5c47..ccc0afbe3 100644
--- a/vp8/vp8_dx_iface.c
+++ b/vp8/vp8_dx_iface.c
@@ -60,6 +60,7 @@ struct vpx_codec_alg_priv
vpx_decrypt_cb decrypt_cb;
void *decrypt_state;
vpx_image_t img;
+ int flushed;
int img_setup;
struct frame_buffers yv12_frame_buffers;
void *user_priv;
@@ -88,6 +89,7 @@ static void vp8_init_ctx(vpx_codec_ctx_t *ctx)
ctx->priv->alg_priv->si.sz = sizeof(ctx->priv->alg_priv->si);
ctx->priv->alg_priv->decrypt_cb = NULL;
ctx->priv->alg_priv->decrypt_state = NULL;
+ ctx->priv->alg_priv->flushed = 0;
ctx->priv->init_flags = ctx->init_flags;
if (ctx->config.dec)
@@ -328,6 +330,13 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
unsigned int resolution_change = 0;
unsigned int w, h;
+ if (data == NULL && data_sz == 0) {
+ ctx->flushed = 1;
+ return VPX_CODEC_OK;
+ }
+
+ /* Reset flushed when receiving a valid frame */
+ ctx->flushed = 0;
/* Update the input fragment data */
if(update_fragments(ctx, data, data_sz, &res) <= 0)