}
}
- if (setjmp(ctx->cpi->common.error.jmp)) {
- ctx->cpi->common.error.setjmp = 0;
- vpx_clear_system_state();
- return VPX_CODEC_CORRUPT_FRAME;
- }
-
/* Initialize the encoder instance on the first frame*/
if (!res && ctx->cpi) {
unsigned int lib_flags;
unsigned char *cx_data_end;
int comp_data_state = 0;
+ if (setjmp(ctx->cpi->common.error.jmp)) {
+ ctx->cpi->common.error.setjmp = 0;
+ vpx_clear_system_state();
+ return VPX_CODEC_CORRUPT_FRAME;
+ }
+ ctx->cpi->common.error.setjmp = 1;
+
/* Set up internal flags */
if (ctx->base.init_flags & VPX_CODEC_USE_PSNR) {
((VP8_COMP *)ctx->cpi)->b_calculate_psnr = 1;
cx_data_end = ctx->cx_data + cx_data_sz;
lib_flags = 0;
- ctx->cpi->common.error.setjmp = 1;
-
while (cx_data_sz >= ctx->cx_data_sz / 2) {
comp_data_state = vp8_get_compressed_data(
ctx->cpi, &lib_flags, &size, cx_data, cx_data_end, &dst_time_stamp,
}
}
}
+ ctx->cpi->common.error.setjmp = 0;
}
return res;
VP8D_COMP *pbi = ctx->yv12_frame_buffers.pbi[0];
VP8_COMMON *const pc = &pbi->common;
if (setjmp(pbi->common.error.jmp)) {
+ pbi->common.error.setjmp = 0;
vp8_remove_decoder_instances(fb);
vp8_zero(fb->pbi);
vpx_clear_system_state();
/* get ready for the next series of fragments */
ctx->fragments.count = 0;
+ pbi->common.error.setjmp = 0;
}
return res;