aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-20 12:08:44 +0100
committerMax Kellermann <max@duempel.org>2010-01-20 12:08:44 +0100
commitacb0ff1ea869ceb5d7561cf840f3252ae9fd02cb (patch)
tree1033d6a57eb65560fd01674c5aa51d9cbf2c0a96 /src
parent2acad9fe1e4eb566ea497f032cb781d2e901543a (diff)
downloadmpd-acb0ff1ea869ceb5d7561cf840f3252ae9fd02cb.tar.gz
mpd-acb0ff1ea869ceb5d7561cf840f3252ae9fd02cb.tar.xz
mpd-acb0ff1ea869ceb5d7561cf840f3252ae9fd02cb.zip
decoder/wavpack: fixed WVC URI
Pass the current URI to wavpack_open_wvc().
Diffstat (limited to 'src')
-rw-r--r--src/decoder/wavpack_decoder_plugin.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/decoder/wavpack_decoder_plugin.c b/src/decoder/wavpack_decoder_plugin.c
index a037688fc..ec0bc5d8d 100644
--- a/src/decoder/wavpack_decoder_plugin.c
+++ b/src/decoder/wavpack_decoder_plugin.c
@@ -463,7 +463,8 @@ wavpack_input_init(struct wavpack_input *isp, struct decoder *decoder,
}
static struct input_stream *
-wavpack_open_wvc(struct decoder *decoder, struct wavpack_input *wpi)
+wavpack_open_wvc(struct decoder *decoder, const char *uri,
+ struct wavpack_input *wpi)
{
struct input_stream *is_wvc;
char *wvc_url = NULL;
@@ -474,10 +475,10 @@ wavpack_open_wvc(struct decoder *decoder, struct wavpack_input *wpi)
* As we use dc->utf8url, this function will be bad for
* single files. utf8url is not absolute file path :/
*/
- if (wpi->is->uri == NULL)
+ if (uri == NULL)
return false;
- wvc_url = g_strconcat(wpi->is->uri, "c", NULL);
+ wvc_url = g_strconcat(uri, "c", NULL);
is_wvc = input_stream_open(wvc_url, NULL);
g_free(wvc_url);
@@ -515,7 +516,7 @@ wavpack_streamdecode(struct decoder * decoder, struct input_stream *is)
struct wavpack_input isp, isp_wvc;
bool can_seek = is->seekable;
- is_wvc = wavpack_open_wvc(decoder, &isp_wvc);
+ is_wvc = wavpack_open_wvc(decoder, is->uri, &isp_wvc);
if (is_wvc != NULL) {
open_flags |= OPEN_WVC;
can_seek &= is_wvc->seekable;