From f685d508da549b0eccfc455c04e2b6fbc3eeb251 Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Fri, 30 Jul 2021 02:42:35 +0900 Subject: [PATCH] vp9 rc: Fills VP9_COMP zero at initialization Change-Id: Ib1a544ce87e8fdbe23c0e54b6426ee228011b126 --- vp9/ratectrl_rtc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vp9/ratectrl_rtc.cc b/vp9/ratectrl_rtc.cc index 0f56e67e8..6446120f5 100644 --- a/vp9/ratectrl_rtc.cc +++ b/vp9/ratectrl_rtc.cc @@ -25,9 +25,9 @@ std::unique_ptr VP9RateControlRTC::Create( VP9RateControlRTC()); if (!rc_api) return nullptr; rc_api->cpi_ = static_cast(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_; -- 2.40.0