aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/decode.c b/src/decode.c
index 544880f57..db780dffe 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -261,11 +261,16 @@ static void decodeStart(PlayerControl * pc, OutputBuffer * cb, DecoderControl *
InputStream inStream;
InputPlugin * plugin = NULL;
char * path;
+ char * relativePath;
if(isRemoteUrl(pc->utf8url)) {
path = utf8StrToLatin1Dup(pc->utf8url);
}
- else path = strdup(rmp2amp(utf8ToFsCharset(pc->utf8url)));
+ else {
+ relativePath = utf8ToFsCharset(pc->utf8url);
+ path = strdup(rmp2amp(relativePath));
+ free(relativePath);
+ }
if(!path) {
dc->error = DECODE_ERROR_FILE;