ctrl_set_svc_params: add missing setjmp `av1_update_layer_context_change_config()` may call `aom_internal_error` on error. Bug: 42302297 Change-Id: I7451af5a6136a39043c5bb8c76362c38c77e7c90
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c index 73150f2..25e7276 100644 --- a/av1/av1_cx_iface.c +++ b/av1/av1_cx_iface.c
@@ -4015,7 +4015,7 @@ AV1_PRIMARY *const ppi = ctx->ppi; AV1_COMP *const cpi = ppi->cpi; aom_svc_params_t *const params = va_arg(args, aom_svc_params_t *); - int64_t target_bandwidth = 0; + volatile int64_t target_bandwidth = 0; // Note svc.use_flexible_mode is set by AV1E_SET_SVC_REF_FRAME_CONFIG. When // it is false (the default) the actual limit is 3 for both spatial and // temporal layers. Given the order of these calls are unpredictable the @@ -4101,7 +4101,14 @@ ctx->oxcf.rc_cfg.target_bandwidth = oxcf->rc_cfg.target_bandwidth = target_bandwidth; set_primary_rc_buffer_sizes(oxcf, ppi); + struct aom_internal_error_info *const error = cpi->common.error; + if (setjmp(error->jmp)) { + error->setjmp = 0; + return error->error_code; + } + error->setjmp = 1; av1_update_layer_context_change_config(cpi, target_bandwidth); + error->setjmp = 0; check_reset_rc_flag(cpi); } else { // Note av1_init_layer_context() relies on cpi->oxcf. The order of that