vp8_create_decoder_instances: add missing setjmp

vp8_decoder_create_threads() has allocations that expect one is set.

Change-Id: I423f2153a2969c88d48ba45cc9ead4a01443ce65
This commit is contained in:
James Zern 2016-08-23 18:29:42 -07:00
parent 0f42d1fa85
commit 13338a481f
2 changed files with 10 additions and 3 deletions

View File

@ -444,10 +444,17 @@ int vp8_create_decoder_instances(struct frame_buffers *fb, VP8D_CONFIG *oxcf) {
if (!fb->pbi[0]) return VPX_CODEC_ERROR;
#if CONFIG_MULTITHREAD
/* enable row-based threading only when use_frame_threads
* is disabled */
if (setjmp(fb->pbi[0]->common.error.jmp)) {
vp8_remove_decoder_instances(fb);
memset(fb->pbi, 0, sizeof(fb->pbi) / sizeof(fb->pbi[0]));
vp8_clear_system_state();
return VPX_CODEC_ERROR;
}
fb->pbi[0]->common.error.setjmp = 1;
fb->pbi[0]->max_threads = oxcf->max_threads;
vp8_decoder_create_threads(fb->pbi[0]);
fb->pbi[0]->common.error.setjmp = 0;
#endif
} else {
/* TODO : create frame threads and decoder instances for each

View File

@ -342,7 +342,7 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
}
res = vp8_create_decoder_instances(&ctx->yv12_frame_buffers, &oxcf);
ctx->decoder_init = 1;
if (res == VPX_CODEC_OK) ctx->decoder_init = 1;
}
/* Set these even if already initialized. The caller may have changed the