Commit 2ede0780 authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

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
parent a5aa5a02
...@@ -453,6 +453,8 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc, ...@@ -453,6 +453,8 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc,
/* Try to find wvc */ /* Try to find wvc */
do { do {
char tmp[MPD_PATH_MAX];
const char *utf8url;
size_t len; size_t len;
err = 1; err = 1;
...@@ -460,11 +462,12 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc, ...@@ -460,11 +462,12 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc,
* As we use dc->utf8url, this function will be bad for * As we use dc->utf8url, this function will be bad for
* single files. utf8url is not absolute file path :/ * 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; break;
} }
len = strlen(dc->utf8url); len = strlen(utf8url);
if (!len) { if (!len) {
break; break;
} }
...@@ -474,7 +477,7 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc, ...@@ -474,7 +477,7 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc,
break; break;
} }
memcpy(wvc_url, dc->utf8url, len); memcpy(wvc_url, utf8url, len);
wvc_url[len] = 'c'; wvc_url[len] = 'c';
wvc_url[len + 1] = '\0'; wvc_url[len + 1] = '\0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment