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
This commit is contained in:
Max Kellermann 2008-06-30 02:43:32 +00:00 committed by Eric Wong
parent 7e99a0b0a9
commit c7d1ce07f3

View File

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