aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-07-03 14:33:21 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-07-03 14:33:21 +0000
commit643d7e77b11dd5138580c2f49224408e9b645272 (patch)
tree6d10ce53bc8e2d5ea9938011dada1b153a9b47ab /src
parent26741dcdebe5e8915a40f4c50dd2c4a87e677830 (diff)
downloadmpd-643d7e77b11dd5138580c2f49224408e9b645272.tar.gz
mpd-643d7e77b11dd5138580c2f49224408e9b645272.tar.xz
mpd-643d7e77b11dd5138580c2f49224408e9b645272.zip
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
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/mp3_plugin.c3
1 files changed, 3 insertions, 0 deletions
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;
}