From 2c7657202e839a661997f08c57554523901ad26d Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 24 Aug 2022 15:48:24 -0700 Subject: [PATCH] vp8_ratectrl_rtc_test.cc: ensure frame_type is initialized this fixes a valgrind failure: ==1095597== Conditional jump or move depends on uninitialised value(s) ==1095597== at 0x12E0CC: (anonymous namespace)::Vp8RcInterfaceTest::PreEncodeFrameHook(libvpx_test::VideoSource*, libvpx_test:: > Encoder*) (vp8_ratectrl_rtc_test.cc:131) ==1095597== by 0x1255A9: libvpx_test::EncoderTest::RunLoop(libvpx_test::VideoSource*) (encode_test_driver.cc:205) Bug: webm:1776 Change-Id: Id3b40f62573ee513e79c74b6315c71b6ecd22c9a Fixed: webm:1776 --- test/vp8_ratectrl_rtc_test.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/vp8_ratectrl_rtc_test.cc b/test/vp8_ratectrl_rtc_test.cc index ad31066..7410f3c 100644 --- a/test/vp8_ratectrl_rtc_test.cc +++ b/test/vp8_ratectrl_rtc_test.cc @@ -127,8 +127,7 @@ class Vp8RcInterfaceTest encoder->Control(VP8E_SET_CPUUSED, -6); encoder->Control(VP8E_SET_RTC_EXTERNAL_RATECTRL, 1); encoder->Control(VP8E_SET_MAX_INTRA_BITRATE_PCT, 1000); - } - if (frame_params_.frame_type == INTER_FRAME) { + } else if (frame_params_.frame_type == INTER_FRAME) { // Disable golden frame update. frame_flags_ |= VP8_EFLAG_NO_UPD_GF; frame_flags_ |= VP8_EFLAG_NO_UPD_ARF; -- 2.7.4