aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-12 07:46:01 +0100
committerMax Kellermann <max@duempel.org>2008-11-12 07:46:01 +0100
commit9806355d4cf55eeecfd1d3123530ad8603902c5a (patch)
tree2572f8796de69a257e59ed89a503735e8a713be5 /src
parentf6765c4d8bcf6e34831e714fd70a3de1791c073f (diff)
downloadmpd-9806355d4cf55eeecfd1d3123530ad8603902c5a.tar.gz
mpd-9806355d4cf55eeecfd1d3123530ad8603902c5a.tar.xz
mpd-9806355d4cf55eeecfd1d3123530ad8603902c5a.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/decoder/aac_plugin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder/aac_plugin.c b/src/decoder/aac_plugin.c
index d7e6fe7f6..4e2208e6d 100644
--- a/src/decoder/aac_plugin.c
+++ b/src/decoder/aac_plugin.c
@@ -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);