aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/wavpack_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 19:09:34 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 19:09:34 +0100
commitfed719197c7014151710c4aae9174990fd131d59 (patch)
tree0fb6d6f69aa60ecdf9eb89286f8354316fffcc92 /src/decoder/wavpack_plugin.c
parentea8ae68e6f1a686fd96530fdaf7b428e33f58ec4 (diff)
downloadmpd-fed719197c7014151710c4aae9174990fd131d59.tar.gz
mpd-fed719197c7014151710c4aae9174990fd131d59.tar.xz
mpd-fed719197c7014151710c4aae9174990fd131d59.zip
song: allocate the result of song_get_url()
Diffstat (limited to '')
-rw-r--r--src/decoder/wavpack_plugin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 11b856224..e08ec1dfc 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -455,8 +455,7 @@ static bool
wavpack_open_wvc(struct decoder *decoder, struct input_stream *is_wvc,
struct wavpack_input *wpi)
{
- char tmp[MPD_PATH_MAX];
- const char *utf8url;
+ char *utf8url;
char *wvc_url = NULL;
bool ret;
char first_byte;
@@ -466,12 +465,14 @@ wavpack_open_wvc(struct decoder *decoder, struct input_stream *is_wvc,
* As we use dc->utf8url, this function will be bad for
* single files. utf8url is not absolute file path :/
*/
- utf8url = decoder_get_url(decoder, tmp);
+ utf8url = decoder_get_uri(decoder);
if (utf8url == NULL) {
return false;
}
wvc_url = g_strconcat(utf8url, "c", NULL);
+ g_free(utf8url);
+
ret = input_stream_open(is_wvc, wvc_url);
g_free(wvc_url);