aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-06-30 02:43:32 +0000
committerEric Wong <normalperson@yhbt.net>2008-06-30 02:43:32 +0000
commitc7d1ce07f36186d3f2410ce0fa1ca7c4e7095a8e (patch)
treedb4356eeb18c7090b5369d03a0b29a00f4263164
parent7e99a0b0a9ed685dece6457a92c87c86daa69bfc (diff)
downloadmpd-c7d1ce07f36186d3f2410ce0fa1ca7c4e7095a8e.tar.gz
mpd-c7d1ce07f36186d3f2410ce0fa1ca7c4e7095a8e.tar.xz
mpd-c7d1ce07f36186d3f2410ce0fa1ca7c4e7095a8e.zip
don't call seekInputStream(0) if r==0
If nothing has been read from the input stream, we don't have to rewind it. git-svn-id: https://svn.musicpd.org/mpd/trunk@7397 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/inputPlugins/_ogg_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inputPlugins/_ogg_common.c b/src/inputPlugins/_ogg_common.c
index b0a9900a6..d24b2b47b 100644
--- a/src/inputPlugins/_ogg_common.c
+++ b/src/inputPlugins/_ogg_common.c
@@ -50,7 +50,8 @@ ogg_stream_type ogg_stream_type_detect(InputStream * inStream)
break;
}
- seekInputStream(inStream, 0, SEEK_SET);
+ if (r > 0)
+ seekInputStream(inStream, 0, SEEK_SET);
if (r >= 32 && memcmp(buf, "OggS", 4) == 0 && (
(memcmp(buf+29, "FLAC", 4) == 0