From f4040d3f6b0fabda92fbbb624cf11f13ff2c164f Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Mon, 14 Nov 2011 02:26:31 +0100 Subject: [PATCH] baseparse: Clear queued frames with other queues --- libs/gst/base/gstbaseparse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 9da9b49..64ba62f 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -456,6 +456,10 @@ gst_base_parse_clear_queues (GstBaseParse * parse) g_list_free (parse->priv->detect_buffers); parse->priv->detect_buffers = NULL; parse->priv->detect_buffers_size = 0; + + g_queue_foreach (&parse->priv->queued_frames, + (GFunc) gst_base_parse_frame_free, NULL); + g_queue_clear (&parse->priv->queued_frames); } static void @@ -485,10 +489,6 @@ gst_base_parse_finalize (GObject * object) g_list_free (parse->priv->pending_events); parse->priv->pending_events = NULL; - g_queue_foreach (&parse->priv->queued_frames, - (GFunc) gst_base_parse_frame_free, NULL); - g_queue_clear (&parse->priv->queued_frames); - if (parse->priv->index) { gst_object_unref (parse->priv->index); parse->priv->index = NULL; -- 2.7.4