changeset 29117:010781e92294

Make sure waitop always unlocks the mainloop even if the operation could not be created. Patch by Lennart Poettering [lennart poettering net]
author reimar
date Thu, 09 Apr 2009 20:04:24 +0000
parents 2cd8c5f81281
children 17c6a6c192a7
files libao2/ao_pulse.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_pulse.c	Thu Apr 09 14:23:09 2009 +0000
+++ b/libao2/ao_pulse.c	Thu Apr 09 20:04:24 2009 +0000
@@ -102,7 +102,10 @@
  */
 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);