From 643d7e77b11dd5138580c2f49224408e9b645272 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Sat, 3 Jul 2004 14:33:21 +0000 Subject: for mp3's, skip all initial frames that aren't layer 3 so we can be sure to get the correct bitrate for computing the song length git-svn-id: https://svn.musicpd.org/mpd/trunk@1783 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/mp3_plugin.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 108bd7e5f..73d9379a5 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -297,6 +297,9 @@ int decodeNextFrameHeader(mp3DecodeData * data, MpdTag ** tag) { } } } + if(data->frame.header.layer != MAD_LAYER_III) { + return DECODE_SKIP; + } return DECODE_OK; } -- cgit v1.2.3