gst-libs/gst/audio/gstringbuffer.c: Set ringbuffer to flushing when stopping so that...
authorWim Taymans <wim.taymans@gmail.com>
Wed, 16 Nov 2005 12:17:06 +0000 (12:17 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 16 Nov 2005 12:17:06 +0000 (12:17 +0000)
Original commit message from CVS:
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_stop):
Set ringbuffer to flushing when stopping so that we don't
block on wait_segment anymore and livelock.

ChangeLog
gst-libs/gst/audio/gstringbuffer.c

index 038ce098d4e45daa59979cba4bd18edd7cd09c4b..8ecb3aefdbc2a8d06b3b61f8384717b37db98fbd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-16  Wim Taymans  <wim@fluendo.com>
+
+       * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_stop):
+       Set ringbuffer to flushing when stopping so that we don't
+       block on wait_segment anymore and livelock.
+
 2005-11-16  Wim Taymans  <wim@fluendo.com>
 
        * examples/seeking/seek.c: (send_event), (do_seek),
index cae51f169603d616cc2e90a14f68786ba0285783..8e38e8a971ca4b6b63ac6d13e52306118da533db 100644 (file)
@@ -796,8 +796,7 @@ gst_ring_buffer_stop (GstRingBuffer * buf)
   GST_DEBUG_OBJECT (buf, "stopping");
 
   GST_LOCK (buf);
-  if (buf->flushing)
-    goto flushing;
+  buf->flushing = TRUE;
 
   /* if started, set to stopped */
   res = g_atomic_int_compare_and_exchange (&buf->state,
@@ -827,12 +826,6 @@ done:
   GST_UNLOCK (buf);
 
   return res;
-
-flushing:
-  {
-    GST_UNLOCK (buf);
-    return FALSE;
-  }
 }
 
 /**