audioringbuffer: Reset segdone when releasing audioringbuffer
authorPaul HENRYS <visechelle@gmail.com>
Wed, 10 Apr 2013 14:38:14 +0000 (16:38 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 15 Apr 2013 08:09:49 +0000 (10:09 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=697723

gst-libs/gst/audio/gstaudioringbuffer.c

index c34bf58..9bcfb2b 100644 (file)
@@ -88,6 +88,8 @@ gst_audio_ring_buffer_init (GstAudioRingBuffer * ringbuffer)
   ringbuffer->waiting = 0;
   ringbuffer->empty_seg = NULL;
   ringbuffer->flushing = TRUE;
+  ringbuffer->segbase = 0;
+  ringbuffer->segdone = 0;
 }
 
 static void
@@ -682,6 +684,7 @@ gst_audio_ring_buffer_release (GstAudioRingBuffer * buf)
   if (G_UNLIKELY (!res))
     goto release_failed;
 
+  g_atomic_int_set (&buf->segdone, 0);
   g_free (buf->empty_seg);
   buf->empty_seg = NULL;
   gst_caps_replace (&buf->spec.caps, NULL);