From d664a63cf434960265873085c53e317e4cb7144e Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Mon, 27 Nov 2023 17:31:04 -0800 Subject: [PATCH] Fix after aosp/2836447 Update 'memset' in StreamPrimary to fill the entire buffer. Bug: 302132812 Bug: 302587331 Test: atest CtsMediaAudioTestCases Change-Id: I6c2e0fc9ab49b35a9484ac3a900aefa9aa98315c --- audio/aidl/default/primary/StreamPrimary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/aidl/default/primary/StreamPrimary.cpp b/audio/aidl/default/primary/StreamPrimary.cpp index 457fbb226c..b22ef3262f 100644 --- a/audio/aidl/default/primary/StreamPrimary.cpp +++ b/audio/aidl/default/primary/StreamPrimary.cpp @@ -60,7 +60,7 @@ StreamPrimary::StreamPrimary(StreamContext* context, const Metadata& metadata) } else { LOG(DEBUG) << __func__ << ": skipping transfer (" << frameCount << " frames)"; *actualFrameCount = frameCount; - if (mIsInput) memset(buffer, 0, frameCount); + if (mIsInput) memset(buffer, 0, frameCount * mFrameSizeBytes); mSkipNextTransfer = false; } if (!mIsAsynchronous) {