shithub: mp3dec

Download patch

ref: 17c0850b5451383a1d7a9a27c226d6e30e32fd42
parent: a12d8d28026964e74e5438010432a361d3c28aa6
author: lieff <[email protected]>
date: Mon Apr 9 17:19:57 EDT 2018

fix total samples calculation without reference input

--- a/minimp3_test.c
+++ b/minimp3_test.c
@@ -93,9 +93,9 @@
 #endif
         if (samples)
         {
+            total_samples += samples*info.channels;
             if (buf_ref && ref_size >= samples*info.channels*2)
             {
-                total_samples += samples*info.channels;
                 for (i = 0; i < samples*info.channels; i++)
                 {
                     int MSEtemp = abs((int)pcm[i] - (int)(short)read16le(&buf_ref[i*sizeof(short)]));