diff options
author | Max Kellermann <max@duempel.org> | 2009-03-09 19:16:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-09 19:16:50 +0100 |
commit | ab3d7c29dae44f39df28c85e26b108c44fdbc4bf (patch) | |
tree | 1fbf2682c53f10df6645dd0caa86627b3c530303 /src/player_thread.c | |
parent | e1bd2c65d5ad75a79e7a2bac9f4b6b778951c786 (diff) | |
download | mpd-ab3d7c29dae44f39df28c85e26b108c44fdbc4bf.tar.gz mpd-ab3d7c29dae44f39df28c85e26b108c44fdbc4bf.tar.xz mpd-ab3d7c29dae44f39df28c85e26b108c44fdbc4bf.zip |
player_thread: don't open audio device when paused
When a PAUSE command is received while the decoder starts, don't open
the audio device when the decoder becomes ready. It's pointless,
because MPD will close if after that.
Diffstat (limited to 'src/player_thread.c')
-rw-r--r-- | src/player_thread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/player_thread.c b/src/player_thread.c index 2a3580da6..dee564ad0 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -179,7 +179,8 @@ player_check_decoder_startup(struct player *player) /* the decoder is ready and ok */ player->decoder_starting = false; - if (!audio_output_all_open(&dc.out_audio_format)) { + if (!player->paused && + !audio_output_all_open(&dc.out_audio_format)) { char *uri = song_get_uri(dc.next_song); g_warning("problems opening audio device " "while playing \"%s\"", uri); @@ -191,9 +192,6 @@ player_check_decoder_startup(struct player *player) return false; } - if (player->paused) - audio_output_all_close(); - pc.total_time = dc.total_time; pc.audio_format = dc.in_audio_format; player->play_audio_format = dc.out_audio_format; |