aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/wavpack_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-16 20:42:08 +0100
committerMax Kellermann <max@duempel.org>2008-11-16 20:42:08 +0100
commit7591403566971eb19ba7bb16002eaa2689a637c7 (patch)
treecc08c5542d7e52b3bb3457b1e62fd209ba125be5 /src/decoder/wavpack_plugin.c
parent8882f062000ec6f86d932eee7c948d1369901c03 (diff)
downloadmpd-7591403566971eb19ba7bb16002eaa2689a637c7.tar.gz
mpd-7591403566971eb19ba7bb16002eaa2689a637c7.tar.xz
mpd-7591403566971eb19ba7bb16002eaa2689a637c7.zip
input_stream: size==-1 means unknown size
Define the special value "-1" as "unknown size". Previously, there was no indicator for streams with unknown size, which might confuse some decoders.
Diffstat (limited to 'src/decoder/wavpack_plugin.c')
-rw-r--r--src/decoder/wavpack_plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 4262d55fa..224895f25 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -410,6 +410,9 @@ wavpack_input_push_back_byte(void *id, int c)
static uint32_t
wavpack_input_get_length(void *id)
{
+ if (wpin(id)->is->size < 0)
+ return 0;
+
return wpin(id)->is->size;
}