Index: source/libvpx/vp8/vp8_dx_iface.c |
=================================================================== |
--- source/libvpx/vp8/vp8_dx_iface.c (revision 293588) |
+++ source/libvpx/vp8/vp8_dx_iface.c (working copy) |
@@ -60,7 +60,6 @@ |
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; |
@@ -75,6 +74,7 @@ |
* known) |
*/ |
(void)si; |
+ (void)flags; |
return sizeof(vpx_codec_alg_priv_t); |
} |
@@ -89,7 +89,6 @@ |
priv->si.sz = sizeof(priv->si); |
priv->decrypt_cb = NULL; |
priv->decrypt_state = NULL; |
- priv->flushed = 0; |
if (ctx->config.dec) |
{ |
@@ -189,7 +188,7 @@ |
/* vet via sync code */ |
if (clear[3] != 0x9d || clear[4] != 0x01 || clear[5] != 0x2a) |
- res = VPX_CODEC_UNSUP_BITSTREAM; |
+ return VPX_CODEC_UNSUP_BITSTREAM; |
si->w = (clear[6] | (clear[7] << 8)) & 0x3fff; |
si->h = (clear[8] | (clear[9] << 8)) & 0x3fff; |
@@ -307,6 +306,11 @@ |
return 0; |
} |
+ if (!ctx->fragments.enabled && (data == NULL && data_sz == 0)) |
+ { |
+ return 0; |
+ } |
+ |
if (!ctx->fragments.enabled) |
{ |
ctx->fragments.ptrs[0] = data; |
@@ -327,14 +331,11 @@ |
unsigned int resolution_change = 0; |
unsigned int w, h; |
- if (data == NULL && data_sz == 0) { |
- ctx->flushed = 1; |
- return VPX_CODEC_OK; |
+ if (!ctx->fragments.enabled && (data == NULL && data_sz == 0)) |
+ { |
+ return 0; |
} |
- /* Reset flushed when receiving a valid frame */ |
- ctx->flushed = 0; |
- |
/* Update the input fragment data */ |
if(update_fragments(ctx, data, data_sz, &res) <= 0) |
return res; |
@@ -401,7 +402,7 @@ |
if (!res) |
{ |
VP8D_COMP *pbi = ctx->yv12_frame_buffers.pbi[0]; |
- if(resolution_change) |
+ if (resolution_change) |
{ |
VP8_COMMON *const pc = & pbi->common; |
MACROBLOCKD *const xd = & pbi->mb; |
@@ -647,6 +648,8 @@ |
return VPX_CODEC_INVALID_PARAM; |
#else |
+ (void)ctx; |
+ (void)args; |
return VPX_CODEC_INCAPABLE; |
#endif |
} |