From: Sebastian Dröge Date: Fri, 24 May 2013 16:38:40 +0000 (+0200) Subject: multiqueue: Don't access the query after signalling the waiting thread X-Git-Tag: 1.1.1~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c6341e6a46aed65daa6ba990833ca979fcb9239;p=platform%2Fupstream%2Fgstreamer.git multiqueue: Don't access the query after signalling the waiting thread It might've free'd the query already. --- diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 68892d3..20524cf 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -185,6 +185,8 @@ struct _GstMultiQueueItem GDestroyNotify destroy; guint32 posid; + + gboolean is_query; }; static GstSingleQueue *gst_single_queue_new (GstMultiQueue * mqueue, guint id); @@ -1110,7 +1112,7 @@ gst_multi_queue_item_steal_object (GstMultiQueueItem * item) static void gst_multi_queue_item_destroy (GstMultiQueueItem * item) { - if (item->object && !GST_IS_QUERY (item->object)) + if (!item->is_query && item->object) gst_mini_object_unref (item->object); g_slice_free (GstMultiQueueItem, item); } @@ -1125,6 +1127,7 @@ gst_multi_queue_buffer_item_new (GstMiniObject * object, guint32 curid) item->object = object; item->destroy = (GDestroyNotify) gst_multi_queue_item_destroy; item->posid = curid; + item->is_query = GST_IS_QUERY (object); item->size = gst_buffer_get_size (GST_BUFFER_CAST (object)); item->duration = GST_BUFFER_DURATION (object);