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)) {
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));
}
/* 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));