You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/18 17:13:24 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3568: audio/pcm_decode.c: skip extra chunk of wav header

xiaoxiang781216 commented on a change in pull request #3568:
URL: https://github.com/apache/incubator-nuttx/pull/3568#discussion_r615427453



##########
File path: audio/pcm_decode.c
##########
@@ -356,17 +363,45 @@ static bool pcm_parsewav(FAR struct pcm_decode_s *priv, uint8_t *data)
   localwav.fmt.align     = pcm_leuint16(wav->fmt.align);
   localwav.fmt.bpsamp    = pcm_leuint16(wav->fmt.bpsamp);
 
-  localwav.data.chunkid  = pcm_leuint32(wav->data.chunkid);
-  localwav.data.chunklen = pcm_leuint32(wav->data.chunklen);
+  /* Find the data chunk */
+
+  dchunk = &wav->data;
+
+  while (len < ret)

Review comment:
       should the condition is ret+ 8 <= len?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org