Commit 9806355d authored by Max Kellermann's avatar Max Kellermann

aac: check if the stream is seekable before length check

If the stream is not seekable, don't try to decode all frames to find out the total song time.
parent f6765c4d
......@@ -205,7 +205,8 @@ static void aac_parse_header(AacBuffer * b, float *length)
if (length == NULL)
return;
if (b->bytesIntoBuffer >= 2 &&
if (b->inStream->seekable &&
b->bytesIntoBuffer >= 2 &&
(b->buffer[0] == 0xFF) && ((b->buffer[1] & 0xF6) == 0xF0)) {
adtsParse(b, length);
input_stream_seek(b->inStream, tagsize, SEEK_SET);
......
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