player_thread: don't call audio_output_all_check() if paused

When the audio output fails to open, MPD pauses playback, but doesn't
reset player.play_audio_format.  This leads to an assertion failure in
audio_output_all_check() on the next REFRESH command, because no audio
output is open.
This commit is contained in:
Max Kellermann 2009-10-15 20:47:00 +02:00
parent f4ea9b7393
commit b69246c646

View File

@ -409,7 +409,8 @@ static void player_process_command(struct player *player)
break;
case PLAYER_COMMAND_REFRESH:
if (audio_format_defined(&player->play_audio_format))
if (audio_format_defined(&player->play_audio_format) &&
!player->paused)
audio_output_all_check();
pc.elapsed_time = audio_output_all_get_elapsed_time();