Make sure waitop always unlocks the mainloop even if the operation could not

be created.
Patch by Lennart Poettering [lennart poettering net]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29157 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-04-09 20:04:24 +00:00
parent 486ce51625
commit a7e4ab04d7
1 changed files with 4 additions and 1 deletions

View File

@ -102,7 +102,10 @@ static void success_cb(pa_stream *s, int success, void *userdata) {
*/
static int waitop(pa_operation *op) {
pa_operation_state_t state;
if (!op) return 0;
if (!op) {
pa_threaded_mainloop_unlock(mainloop);
return 0;
}
state = pa_operation_get_state(op);
while (state == PA_OPERATION_RUNNING) {
pa_threaded_mainloop_wait(mainloop);