diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2006-12-23 15:58:06 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2006-12-23 15:58:06 +0000 |
commit | df3222095c354093e008f087c8a93fd6b416878c (patch) | |
tree | 77517c878f002177d9c189447e3a8043995f0aa5 /src | |
parent | 57b0a429407a57cee17f159c6af7db9d6d937c91 (diff) | |
download | mpd-df3222095c354093e008f087c8a93fd6b416878c.tar.gz mpd-df3222095c354093e008f087c8a93fd6b416878c.tar.xz mpd-df3222095c354093e008f087c8a93fd6b416878c.zip |
Only parse gapless info if the input stream is seekable, under the
assumption that non-seekable streams are live and any gapless info is
incorrect.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5150 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index b2279b29e..4b3ab6c8c 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -679,7 +679,8 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc, data->foundXing = 1; data->muteFrame = MUTEFRAME_SKIP; - if (parse_lame(&lame, &ptr, &bitlen)) { + if (data->inStream->seekable && + parse_lame(&lame, &ptr, &bitlen)) { data->dropSamplesAtStart = lame.encoderDelay + DECODERDELAY; data->dropSamplesAtEnd = lame.encoderPadding; } |