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



##########
File path: audio/pcm_decode.c
##########
@@ -1087,6 +1090,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s 
*dev,
     {
       /* Parse and verify the candidate PCM WAV file header */
 
+#ifndef CONFIG_AUDIO_FORMAT_RAW
       if (pcm_parsewav(priv, &apb->samp[apb->curbyte]))

Review comment:
       if so, you can select the second form: pass the length to pcm_parsewav 
and let pcm_parsewav verify the length for us. The current implementation will 
report the false alarm when the raw pcm file length is smaller than struct 
wav_header_s.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to