This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 9a68248f2 system/nxlooper: Initialize `audio_caps_s` to 0
9a68248f2 is described below
commit 9a68248f29af287b337fa848da77415753f6acd0
Author: Tiago Medicci Serrano <[email protected]>
AuthorDate: Thu Aug 31 10:25:57 2023 -0300
system/nxlooper: Initialize `audio_caps_s` to 0
This avoids unspecified values to be passed to the lower interfaces
of the audio subsystem.
---
system/nxlooper/nxlooper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/system/nxlooper/nxlooper.c b/system/nxlooper/nxlooper.c
index 683a18c40..a55b02859 100644
--- a/system/nxlooper/nxlooper.c
+++ b/system/nxlooper/nxlooper.c
@@ -1053,6 +1053,7 @@ int nxlooper_loopback(FAR struct nxlooper_s *plooper, int
format,
goto err_out_record;
}
+ memset(&caps, 0, sizeof(struct audio_caps_s));
caps.ac_len = sizeof(caps);
caps.ac_type = AUDIO_TYPE_INPUT;
caps.ac_subtype = AUDIO_TYPE_QUERY;