summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-11-08 15:12:45 -0800
committerJessica Wagantall <jwagantall@cyngn.com>2016-11-09 11:58:37 -0800
commit8ba7fb7d71ab45ad0bce172621452f6cea985fee (patch)
tree8e925445e84720214de3cf43ced220e7bd304a1a
parent22ab46526bb7175217c59e974ed8589b48c298df (diff)
parent063be1485e0099bc81ace3a08b0ec9186dcad693 (diff)
downloadandroid_external_libvpx-8ba7fb7d71ab45ad0bce172621452f6cea985fee.tar.gz
android_external_libvpx-8ba7fb7d71ab45ad0bce172621452f6cea985fee.tar.bz2
android_external_libvpx-8ba7fb7d71ab45ad0bce172621452f6cea985fee.zip
Merge tag 'android-6.0.1_r74' into HEAD
CYNGNOS-3303 Android 6.0.1 release 74 Change-Id: I9987f29687c87da7587d7f6b897826c4bedbcc0f
-rw-r--r--libvpx/vp8/vp8_dx_iface.c8
-rw-r--r--libvpx/vp9/common/vp9_alloccommon.c1
2 files changed, 7 insertions, 2 deletions
diff --git a/libvpx/vp8/vp8_dx_iface.c b/libvpx/vp8/vp8_dx_iface.c
index 72e4770..847cafb 100644
--- a/libvpx/vp8/vp8_dx_iface.c
+++ b/libvpx/vp8/vp8_dx_iface.c
@@ -198,8 +198,8 @@ static vpx_codec_err_t vp8_peek_si_internal(const uint8_t *data,
si->h = (clear[8] | (clear[9] << 8)) & 0x3fff;
/*printf("w=%d, h=%d\n", si->w, si->h);*/
- if (!(si->h | si->w))
- res = VPX_CODEC_UNSUP_BITSTREAM;
+ if (!(si->h && si->w))
+ res = VPX_CODEC_CORRUPT_FRAME;
}
else
{
@@ -421,6 +421,10 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
if (setjmp(pbi->common.error.jmp))
{
pbi->common.error.setjmp = 0;
+ /* on failure clear the cached resolution to ensure a full
+ * reallocation is attempted on resync. */
+ ctx->si.w = 0;
+ ctx->si.h = 0;
vp8_clear_system_state();
/* same return value as used in vp8dx_receive_compressed_data */
return -1;
diff --git a/libvpx/vp9/common/vp9_alloccommon.c b/libvpx/vp9/common/vp9_alloccommon.c
index ac417b6..ed337a0 100644
--- a/libvpx/vp9/common/vp9_alloccommon.c
+++ b/libvpx/vp9/common/vp9_alloccommon.c
@@ -152,6 +152,7 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
return 0;
fail:
+ vp9_set_mb_mi(cm, 0, 0);
vp9_free_context_buffers(cm);
return 1;
}