shithub: mp3dec

Download patch

ref: 27edf128199155f44c3bc811d080ad1b317c0c7e
parent: 5ed200f66e308a5335b227ffbc3d2d947a56f767
parent: 7a6445efbd8d941987bdb5682b670eff100bfd9a
author: Lion <lieff@users.noreply.github.com>
date: Fri Aug 3 19:58:00 EDT 2018

Merge pull request #28 from kajott/master
added option to decode headers only

--- a/minimp3.h
+++ b/minimp3.h
@@ -1645,6 +1645,11 @@
     info->layer = 4 - HDR_GET_LAYER(hdr);
     info->bitrate_kbps = hdr_bitrate_kbps(hdr);
 
+    if (!pcm)
+    {
+        return hdr_frame_samples(hdr);
+    }
+
     bs_init(bs_frame, hdr + HDR_SIZE, frame_size - HDR_SIZE);
     if (HDR_IS_CRC(hdr))
     {