dtlsenc: Clear the queue when deactivating the pad
authorSebastian Dröge <sebastian@centricular.com>
Wed, 18 Mar 2015 16:40:47 +0000 (17:40 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 18 Mar 2015 16:40:47 +0000 (17:40 +0100)
ext/dtls/gstdtlsenc.c

index b635e53..2f8d483 100644 (file)
@@ -380,6 +380,8 @@ src_activate_mode (GstPad * pad, GstObject * parent, GstPadMode mode,
     GST_DEBUG_OBJECT (self, "deactivating src pad");
 
     g_mutex_lock (&self->queue_lock);
+    g_queue_foreach (&self->queue, (GFunc) gst_buffer_unref, NULL);
+    g_queue_clear (&self->queue);
     self->flushing = TRUE;
     g_cond_signal (&self->queue_cond_add);
     g_mutex_unlock (&self->queue_lock);