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