summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/gstnicesrc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gst/gstnicesrc.c b/gst/gstnicesrc.c
index d369e09..a3f223e 100644
--- a/gst/gstnicesrc.c
+++ b/gst/gstnicesrc.c
@@ -327,8 +327,7 @@ gst_nice_src_dispose (GObject *object)
src->mainctx = NULL;
if (src->outbufs) {
- g_queue_foreach (src->outbufs, (GFunc) gst_buffer_unref, NULL);
- g_queue_free (src->outbufs);
+ g_queue_free_full (src->outbufs, (GDestroyNotify) gst_buffer_unref);
}
src->outbufs = NULL;
@@ -430,8 +429,7 @@ gst_nice_src_change_state (GstElement * element, GstStateChange transition)
nice_agent_attach_recv (src->agent, src->stream_id, src->component_id,
src->mainctx, NULL, NULL);
GST_OBJECT_LOCK (src);
- g_queue_foreach (src->outbufs, (GFunc) gst_buffer_unref, NULL);
- g_queue_clear (src->outbufs);
+ g_queue_free_full (src->outbufs, (GDestroyNotify) gst_buffer_unref);
GST_OBJECT_UNLOCK (src);
break;
case GST_STATE_CHANGE_READY_TO_PAUSED: