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
This commit is contained in:
J. Alexander Treuman 2006-12-23 15:58:06 +00:00
parent 57b0a42940
commit df3222095c

View File

@ -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;
}