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.
This commit is contained in:
parent
f6765c4d8b
commit
9806355d4c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user