output_thread: check again if output is open on PAUSE

Basically the same as the 0.15.5 patch "check again if output is open
on CANCEL".  Same race condition, same fix.
This commit is contained in:
Max Kellermann 2009-10-21 08:07:07 +02:00
parent b2b300b635
commit 1a6ed81193
2 changed files with 10 additions and 0 deletions

1
NEWS
View File

@ -1,4 +1,5 @@
ver 0.15.6 (2009/??/??)
* output_thread: check again if output is open on PAUSE
ver 0.15.5 (2009/10/18)

View File

@ -248,6 +248,15 @@ static gpointer audio_output_task(gpointer arg)
break;
case AO_COMMAND_PAUSE:
if (!ao->open) {
/* the output has failed after
audio_output_all_pause() has
submitted the PAUSE command; bail
out */
ao_command_finished(ao);
break;
}
ao_pause(ao);
/* don't "break" here: this might cause
ao_play() to be called when command==CLOSE