summaryrefslogtreecommitdiff
path: root/src/PlayerThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 01:01:15 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 01:01:15 +0200
commitbe8ceae6e6c2836233dd8acedd829b18943f820a (patch)
treef625c58523ccee5c27c082c49e15c2d142d836fb /src/PlayerThread.cxx
parent67ae033de7e769067035f76c992e21d3616bf3fe (diff)
Song: GetURI() returns std::string
Diffstat (limited to 'src/PlayerThread.cxx')
-rw-r--r--src/PlayerThread.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index 9ad37eaee..94cfe2af1 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -461,12 +461,10 @@ Player::CheckDecoderStartup()
decoder_starting = false;
if (!paused && !OpenOutput()) {
- char *uri = dc.song->GetURI();
+ const auto uri = dc.song->GetURI();
FormatError(player_domain,
"problems opening audio device "
- "while playing \"%s\"", uri);
- g_free(uri);
-
+ "while playing \"%s\"", uri.c_str());
return true;
}
@@ -878,9 +876,10 @@ Player::SongBorder()
{
xfade_state = CrossFadeState::UNKNOWN;
- char *uri = song->GetURI();
- FormatInfo(player_domain, "played \"%s\"", uri);
- g_free(uri);
+ {
+ const auto uri = song->GetURI();
+ FormatInfo(player_domain, "played \"%s\"", uri.c_str());
+ }
ReplacePipe(dc.pipe);