ref: f685d508da549b0eccfc455c04e2b6fbc3eeb251
parent: fc04a9491ebaaa8e2b1c7c8e0587c8a1873531d6
author: Hirokazu Honda <[email protected]>
date: Thu Jul 29 22:42:35 EDT 2021
vp9 rc: Fills VP9_COMP zero at initialization Change-Id: Ib1a544ce87e8fdbe23c0e54b6426ee228011b126
--- a/vp9/ratectrl_rtc.cc
+++ b/vp9/ratectrl_rtc.cc
@@ -25,9 +25,9 @@
VP9RateControlRTC());
if (!rc_api) return nullptr;
rc_api->cpi_ = static_cast<VP9_COMP *>(vpx_memalign(32, sizeof(*cpi_)));
- if (rc_api->cpi_ == nullptr) {
- return nullptr;
- }
+ if (!rc_api->cpi_) return nullptr;
+ vp9_zero(*rc_api->cpi_);
+
rc_api->InitRateControl(cfg);
if (cfg.aq_mode) {
VP9_COMP *const cpi = rc_api->cpi_;