From 44e8772ee99a627d741b8e80ce28ab33527939ae Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Thu, 26 Sep 2024 16:05:48 +0900 Subject: [PATCH] audio: Fix caps initialization in pcm_enqueuebuffer() Summary: - I noticed that caps is not correctly initialized. - This commit fixes this issue. Impact: - None Testing: - Tested with spresense:wifi_smp + nxplayer Signed-off-by: Masayuki Ishikawa --- audio/pcm_decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/pcm_decode.c b/audio/pcm_decode.c index fbd618b908..98bf6faed0 100644 --- a/audio/pcm_decode.c +++ b/audio/pcm_decode.c @@ -1092,6 +1092,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, if (headersize > 0) { struct audio_caps_s caps; + memset(&caps, 0, sizeof(caps)); /* Configure the lower level for the number of channels, bitrate, * and sample bitwidth.