From df3222095c354093e008f087c8a93fd6b416878c Mon Sep 17 00:00:00 2001
From: "J. Alexander Treuman" <jat@spatialrift.net>
Date: Sat, 23 Dec 2006 15:58:06 +0000
Subject: 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
---
 src/inputPlugins/mp3_plugin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 		}
-- 
cgit v1.2.3