diff options
author | Jerome Jiang <jianj@google.com> | 2023-05-05 13:40:50 -0400 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2023-05-05 15:41:33 -0400 |
commit | 5636f098b38e0c013f802c1b411e2cf54d32b183 (patch) | |
tree | de4742122bc80ba5d50a3aabf79801916fd758f5 | |
parent | b3920105c3758c846aead964e1217b6af4a98c15 (diff) | |
download | libvpx-5636f098b38e0c013f802c1b411e2cf54d32b183.tar.gz |
Set setjmp flag in VP9 RTC rate control library
Change-Id: Ic5ec8dc7d9637091d4137a47d793cf29e76fdc45
-rw-r--r-- | vp9/ratectrl_rtc.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vp9/ratectrl_rtc.cc b/vp9/ratectrl_rtc.cc index 29033d4ba..d92b09571 100644 --- a/vp9/ratectrl_rtc.cc +++ b/vp9/ratectrl_rtc.cc @@ -140,7 +140,16 @@ bool VP9RateControlRTC::UpdateRateControl( cpi_->framerate = rc_cfg.framerate; cpi_->svc.number_spatial_layers = rc_cfg.ss_number_layers; cpi_->svc.number_temporal_layers = rc_cfg.ts_number_layers; + vp9_set_mb_mi(cm, cm->width, cm->height); + + if (setjmp(cpi_->common.error.jmp)) { + cpi_->common.error.setjmp = 0; + vpx_clear_system_state(); + return false; + } + cpi_->common.error.setjmp = 1; + for (int tl = 0; tl < cpi_->svc.number_temporal_layers; ++tl) { oxcf->ts_rate_decimator[tl] = rc_cfg.ts_rate_decimator[tl]; } @@ -168,6 +177,8 @@ bool VP9RateControlRTC::UpdateRateControl( (int)cpi_->oxcf.target_bandwidth); } vp9_check_reset_rc_flag(cpi_); + + cpi_->common.error.setjmp = 0; return true; } |