Unified · Split
| @@ -1645,6 +1645,11 @@ int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, short · 1644 unmodified lines | |||
| 1645 | info->layer = 4 - HDR_GET_LAYER(hdr); | 1645 | info->layer = 4 - HDR_GET_LAYER(hdr); |
| 1646 | info->bitrate_kbps = hdr_bitrate_kbps(hdr); | 1646 | info->bitrate_kbps = hdr_bitrate_kbps(hdr); |
| 1647 | 1647 | ||
| 1648 | if (!pcm) | ||
| 1649 | { | ||
| 1650 | return hdr_frame_samples(hdr); | ||
| 1651 | } | ||
| 1652 | |||
| 1648 | bs_init(bs_frame, hdr + HDR_SIZE, frame_size - HDR_SIZE); | 1653 | bs_init(bs_frame, hdr + HDR_SIZE, frame_size - HDR_SIZE); |
| 1649 | if (HDR_IS_CRC(hdr)) | 1654 | if (HDR_IS_CRC(hdr)) |
| 1650 | { | 1655 | { |