shithub: mp3dec

Download patch

ref: 0b0a94a8121dd0d11274274622b9c0ae05d58107
parent: 8328b42da4c149b6f1ccac2e09f27444011f2d9e
author: lieff <lieff@users.noreply.github.com>
date: Tue Mar 6 13:03:53 EST 2018

fix mp4 mode and single frame decode

--- a/minimp3.h
+++ b/minimp3.h
@@ -1626,9 +1626,9 @@
                     *free_format_bytes = fb;
                 }
             }
-
-            if (frame_bytes && i + frame_and_padding <= mp3_bytes &&
-                mp3d_match_frame(mp3, mp3_bytes - i, frame_bytes))
+            if ((frame_bytes && i + frame_and_padding <= mp3_bytes &&
+                mp3d_match_frame(mp3, mp3_bytes - i, frame_bytes)) ||
+                (!i && frame_and_padding == mp3_bytes))
             {
                 *ptr_frame_bytes = frame_and_padding;
                 return i;