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:
parent
7e99a0b0a9
commit
c7d1ce07f3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user