Commit df322209 authored by J. Alexander Treuman's avatar J. Alexander Treuman

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
parent 57b0a429
...@@ -679,7 +679,8 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc, ...@@ -679,7 +679,8 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc,
data->foundXing = 1; data->foundXing = 1;
data->muteFrame = MUTEFRAME_SKIP; 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->dropSamplesAtStart = lame.encoderDelay + DECODERDELAY;
data->dropSamplesAtEnd = lame.encoderPadding; data->dropSamplesAtEnd = lame.encoderPadding;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment