audioringbuffer: reset spec on _release
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 30 Oct 2012 10:19:59 +0000 (10:19 +0000)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 30 Oct 2012 10:33:04 +0000 (10:33 +0000)
Reset the caps and the audioinfo when releasing the ringbuffer.
Fixed a bug with reusing pulsesink.

gst-libs/gst/audio/gstaudioringbuffer.c

index 7960c9d..dcc0d5a 100644 (file)
@@ -669,6 +669,8 @@ gst_audio_ring_buffer_release (GstAudioRingBuffer * buf)
 
   g_free (buf->empty_seg);
   buf->empty_seg = NULL;
+  gst_caps_replace (&buf->spec.caps, NULL);
+  gst_audio_info_init (&buf->spec.info);
   GST_DEBUG_OBJECT (buf, "released device");
 
 done: