From 2ede0780f66ce0064c625e4611b29e2400467303 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:15:16 +0000 Subject: fix compilation error in wavpack plugin The patch "Start using song pointers in core data structures" removed dc->utf8url, and the adaption for wavpack_plugin.c was missing. git-svn-id: https://svn.musicpd.org/mpd/trunk@7288 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/wavpack_plugin.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/inputPlugins') diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index 37dc4f3d0..527e60a56 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -453,6 +453,8 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc, /* Try to find wvc */ do { + char tmp[MPD_PATH_MAX]; + const char *utf8url; size_t len; err = 1; @@ -460,11 +462,12 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc, * As we use dc->utf8url, this function will be bad for * single files. utf8url is not absolute file path :/ */ - if (dc->utf8url == NULL) { + utf8url = get_song_url(tmp, getPlayerData()->playerControl.current_song); + if (utf8url == NULL) { break; } - len = strlen(dc->utf8url); + len = strlen(utf8url); if (!len) { break; } @@ -474,7 +477,7 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc, break; } - memcpy(wvc_url, dc->utf8url, len); + memcpy(wvc_url, utf8url, len); wvc_url[len] = 'c'; wvc_url[len + 1] = '\0'; -- cgit v1.2.3