aboutsummaryrefslogtreecommitdiffstats
path: root/src/icy_metadata.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-03 23:55:03 +0100
committerMax Kellermann <max@duempel.org>2009-01-03 23:55:03 +0100
commit96c18e7d159d5b4f38642982ed0b370f15b385e1 (patch)
treefe89caee7b0b4d88a0469629b3e9ee192584c6f2 /src/icy_metadata.c
parentf9e9089f424217db31c0ad612777bd5a11620c2a (diff)
downloadmpd-96c18e7d159d5b4f38642982ed0b370f15b385e1.tar.gz
mpd-96c18e7d159d5b4f38642982ed0b370f15b385e1.tar.xz
mpd-96c18e7d159d5b4f38642982ed0b370f15b385e1.zip
input_curl: enabled Icy-Metadata support
Diffstat (limited to '')
-rw-r--r--src/icy_metadata.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/icy_metadata.c b/src/icy_metadata.c
index 5049d2805..aa65b32ca 100644
--- a/src/icy_metadata.c
+++ b/src/icy_metadata.c
@@ -52,9 +52,11 @@ icy_reset(struct icy_metadata *im)
size_t
icy_data(struct icy_metadata *im, size_t length)
{
- assert(icy_defined(im));
assert(length > 0);
+ if (!icy_defined(im))
+ return length;
+
if (im->data_rest == 0)
return 0;
@@ -145,7 +147,7 @@ icy_meta(struct icy_metadata *im, const void *data, size_t length)
if (length > im->meta_size - im->meta_position)
length = im->meta_size - im->meta_position;
- memcpy(im->meta_data + im->meta_position, data, length);
+ memcpy(im->meta_data + im->meta_position, p, length);
im->meta_position += length;
if (p != data)