summaryrefslogtreecommitdiff
path: root/vp8/vp8_dx_iface.c
diff options
context:
space:
mode:
authorJerome Jiang <jianj@google.com>2018-12-13 16:00:18 -0800
committerJerome Jiang <jianj@google.com>2018-12-17 13:40:06 -0800
commit967042c9296c3a8bdf12f88551755457607773c7 (patch)
tree05985e7f1218683bfd74bdef733737ee29d2c09b /vp8/vp8_dx_iface.c
parent890c8a15d11be3141dff16c2c577622b59abbb66 (diff)
downloadlibvpx-967042c9296c3a8bdf12f88551755457607773c7.tar
libvpx-967042c9296c3a8bdf12f88551755457607773c7.tar.gz
libvpx-967042c9296c3a8bdf12f88551755457607773c7.tar.bz2
libvpx-967042c9296c3a8bdf12f88551755457607773c7.zip
Remove -Wextra suppression.
BUG=webm:1246 Change-Id: Iae78e266faa9c4989500fc919b24f2f584ac0550
Diffstat (limited to 'vp8/vp8_dx_iface.c')
-rw-r--r--vp8/vp8_dx_iface.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c
index a2008b903..6d1c5f595 100644
--- a/vp8/vp8_dx_iface.c
+++ b/vp8/vp8_dx_iface.c
@@ -335,8 +335,8 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
if (!res) {
VP8D_COMP *pbi = ctx->yv12_frame_buffers.pbi[0];
+ VP8_COMMON *const pc = &pbi->common;
if (resolution_change) {
- VP8_COMMON *const pc = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
#if CONFIG_MULTITHREAD
int i;
@@ -428,6 +428,23 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
pbi->common.fb_idx_ref_cnt[0] = 0;
}
+ if (setjmp(pbi->common.error.jmp)) {
+ /* We do not know if the missing frame(s) was supposed to update
+ * any of the reference buffers, but we act conservative and
+ * mark only the last buffer as corrupted.
+ */
+ pc->yv12_fb[pc->lst_fb_idx].corrupted = 1;
+
+ if (pc->fb_idx_ref_cnt[pc->new_fb_idx] > 0) {
+ pc->fb_idx_ref_cnt[pc->new_fb_idx]--;
+ }
+ pc->error.setjmp = 0;
+ res = update_error_state(ctx, &pbi->common.error);
+ return res;
+ }
+
+ pbi->common.error.setjmp = 1;
+
/* update the pbi fragment data */
pbi->fragments = ctx->fragments;