output_thread: fix assertion failure due to race condition in OPEN
Change the assertion on "fail_timer==NULL" in OPEN to a runtime check. This assertion crashed when the output thread failed while the player thread was calling audio_output_open().
This commit is contained in:
parent
2ee047a1dd
commit
8d5fa754e8
2
NEWS
2
NEWS
|
@ -1,5 +1,5 @@
|
|||
ver 0.15.14 (2010/??/??)
|
||||
|
||||
* output_thread: fix assertion failure due to race condition in OPEN
|
||||
|
||||
ver 0.15.13 (2010/10/10)
|
||||
* output_thread: fix race condition after CANCEL command
|
||||
|
|
|
@ -197,10 +197,18 @@ static gpointer audio_output_task(gpointer arg)
|
|||
|
||||
case AO_COMMAND_OPEN:
|
||||
assert(!ao->open);
|
||||
assert(ao->fail_timer == NULL);
|
||||
assert(ao->pipe != NULL);
|
||||
assert(ao->chunk == NULL);
|
||||
|
||||
if (ao->fail_timer != NULL) {
|
||||
/* this can only happen when this
|
||||
output thread fails while
|
||||
audio_output_open() is run in the
|
||||
player thread */
|
||||
g_timer_destroy(ao->fail_timer);
|
||||
ao->fail_timer = NULL;
|
||||
}
|
||||
|
||||
error = NULL;
|
||||
ret = ao_plugin_open(ao->plugin, ao->data,
|
||||
&ao->out_audio_format,
|
||||
|
|
Loading…
Reference in New Issue