diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 9a87e2c1b4..9e9209c08e 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1967,6 +1967,7 @@ static void gst_single_queue_flush_queue (GstSingleQueue * sq, gboolean full) { GstDataQueueItem *sitem; + GstMultiQueueItem *mitem; gboolean was_flushing = FALSE; while (!gst_data_queue_is_empty (sq->queue)) { @@ -1982,10 +1983,13 @@ gst_single_queue_flush_queue (GstSingleQueue * sq, gboolean full) continue; } + mitem = (GstMultiQueueItem *) sitem; + data = sitem->object; - if (!full && GST_IS_EVENT (data) && GST_EVENT_IS_STICKY (data) && - GST_EVENT_TYPE (data) != GST_EVENT_SEGMENT + if (!full && !mitem->is_query && GST_IS_EVENT (data) + && GST_EVENT_IS_STICKY (data) + && GST_EVENT_TYPE (data) != GST_EVENT_SEGMENT && GST_EVENT_TYPE (data) != GST_EVENT_EOS) { gst_pad_store_sticky_event (sq->srcpad, GST_EVENT_CAST (data)); } diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index aae51aa2f9..765005dbe9 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -589,7 +589,8 @@ gst_queue_locked_flush (GstQueue * queue, gboolean full) /* Then lose another reference because we are supposed to destroy that data when flushing */ - if (!full && GST_IS_EVENT (qitem->item) && GST_EVENT_IS_STICKY (qitem->item) + if (!full && !qitem->is_query && GST_IS_EVENT (qitem->item) + && GST_EVENT_IS_STICKY (qitem->item) && GST_EVENT_TYPE (qitem->item) != GST_EVENT_SEGMENT && GST_EVENT_TYPE (qitem->item) != GST_EVENT_EOS) { gst_pad_store_sticky_event (queue->srcpad, GST_EVENT_CAST (qitem->item));