Commit c7d1ce07 authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

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
parent 7e99a0b0
......@@ -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
......
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