aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/player_thread.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index acaf7e123..98cc64441 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -178,13 +178,15 @@ static void player_process_command(struct player *player)
if (openAudioDevice(NULL)) {
pc.state = PLAYER_STATE_PLAY;
} else {
- char tmp[MPD_PATH_MAX];
+ char *uri = song_get_uri(dc.next_song);
+ g_warning("problems opening audio device "
+ "while playing \"%s\"", uri);
+ g_free(uri);
+
assert(dc.next_song == NULL || dc.next_song->url != NULL);
pc.errored_song = dc.next_song;
pc.error = PLAYER_ERROR_AUDIO;
- g_warning("problems opening audio device "
- "while playing \"%s\"",
- song_get_url(dc.next_song, tmp));
+
player->paused = true;
}
}
@@ -335,13 +337,14 @@ static void do_play(void)
/* the decoder is ready and ok */
player.decoder_starting = false;
if (!openAudioDevice(&dc.out_audio_format)) {
- char tmp[MPD_PATH_MAX];
+ char *uri = song_get_uri(dc.next_song);
+ g_warning("problems opening audio device "
+ "while playing \"%s\"", uri);
+ g_free(uri);
+
assert(dc.next_song == NULL || dc.next_song->url != NULL);
pc.errored_song = dc.next_song;
pc.error = PLAYER_ERROR_AUDIO;
- g_warning("problems opening audio device "
- "while playing \"%s\"",
- song_get_url(dc.next_song, tmp));
break;
}