aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-23 21:38:07 +0200
committerMax Kellermann <max@duempel.org>2013-10-23 21:58:44 +0200
commit3d12f8d2466d6a000bb116b4363a695c862ab52d (patch)
tree21d7e2010685edf9ed8254aeff32c56cb7a8f3df /src/DecoderThread.cxx
parentc3e720279c89a56b9bbdc46cc6d8c02aefb10ed4 (diff)
downloadmpd-3d12f8d2466d6a000bb116b4363a695c862ab52d.tar.gz
mpd-3d12f8d2466d6a000bb116b4363a695c862ab52d.tar.xz
mpd-3d12f8d2466d6a000bb116b4363a695c862ab52d.zip
UriUtil: uri_remove_auth() returns std::string
Diffstat (limited to 'src/DecoderThread.cxx')
-rw-r--r--src/DecoderThread.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx
index b3f0e6f36..3364f23b3 100644
--- a/src/DecoderThread.cxx
+++ b/src/DecoderThread.cxx
@@ -38,8 +38,6 @@
#include "tag/ApeReplayGain.hxx"
#include "Log.hxx"
-#include <glib.h>
-
static constexpr Domain decoder_thread_domain("decoder_thread");
/**
@@ -367,13 +365,12 @@ decoder_run_song(decoder_control &dc,
dc.state = DecoderState::ERROR;
const char *error_uri = song->uri;
- char *allocated = uri_remove_auth(error_uri);
- if (allocated != nullptr)
- error_uri = allocated;
+ const std::string allocated = uri_remove_auth(error_uri);
+ if (!allocated.empty())
+ error_uri = allocated.c_str();
dc.error.Format(decoder_domain,
"Failed to decode %s", error_uri);
- g_free(allocated);
}
dc.client_cond.signal();