diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-02-15 13:21:09 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-02-15 13:21:09 +0100 |
commit | a53d75fb7fd3bbe4bc619658fe9ed7ed1b4f2879 (patch) | |
tree | c2e75c44d39b7b99b3ac208ef356ea0c95d74cb6 | |
parent | b0c97c912f4ee5bc34692d7d737979b390ac621b (diff) | |
download | xine-lib-a53d75fb7fd3bbe4bc619658fe9ed7ed1b4f2879.tar.gz xine-lib-a53d75fb7fd3bbe4bc619658fe9ed7ed1b4f2879.tar.bz2 |
Don't unlock unconditionally the mainloop on failure.
-rw-r--r-- | src/audio_out/audio_pulse_out.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index 26d121bf6..2811bbdbc 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -246,7 +246,7 @@ static int ao_pulse_open(ao_driver_t *this_gen, pa_threaded_mainloop_lock(this->pa_class->mainloop); ret = pa_context_connect(this->pa_class->context, this->host, 1, NULL); if ( ret < 0 ) - goto fail; + goto fail_unlock; pa_context_set_state_callback(this->pa_class->context, __xine_pa_context_status_callback, this); @@ -289,8 +289,9 @@ static int ao_pulse_open(ao_driver_t *this_gen, return this->sample_rate; -fail: + fail_unlock: pa_threaded_mainloop_unlock(this->pa_class->mainloop); + fail: this_gen->close(this_gen); return 0; } |