summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-05-24 18:30:44 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-05-24 18:30:44 +0200
commit3b44a44a0147d81de82ace9d9d843deb1b1c1689 (patch)
tree3fc81d60be6fd87b13285704a8f4d7aae2ba1ac3 /plugins
parent3e515099ec3026d539d1149e4861db912eadc9d9 (diff)
multiqueue: Make sure to always signal any possible pending serialized queries
And don't unref them when flushing the queue, they're owned by the caller! https://bugzilla.gnome.org/show_bug.cgi?id=700342
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gstmultiqueue.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index a7ae2077f..68892d367 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -728,9 +728,6 @@ gst_multi_queue_change_state (GstElement * element, GstStateChange transition)
}
return result;
-
-
-
}
static gboolean
@@ -1113,7 +1110,7 @@ gst_multi_queue_item_steal_object (GstMultiQueueItem * item)
static void
gst_multi_queue_item_destroy (GstMultiQueueItem * item)
{
- if (item->object)
+ if (item->object && !GST_IS_QUERY (item->object))
gst_mini_object_unref (item->object);
g_slice_free (GstMultiQueueItem, item);
}
@@ -1362,6 +1359,8 @@ out_flushing:
compute_high_time (mq);
compute_high_id (mq);
wake_up_next_non_linked (mq);
+ sq->last_query = FALSE;
+ g_cond_signal (&sq->query_handled);
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
/* upstream needs to see fatal result ASAP to shut things down,
@@ -1462,8 +1461,12 @@ gst_multi_queue_sink_activate_mode (GstPad * pad, GstObject * parent,
/* All pads start off linked until they push one buffer */
sq->srcresult = GST_FLOW_OK;
sq->pushed = FALSE;
+ gst_data_queue_set_flushing (sq->queue, FALSE);
} else {
sq->srcresult = GST_FLOW_FLUSHING;
+ sq->last_query = FALSE;
+ g_cond_signal (&sq->query_handled);
+ gst_data_queue_set_flushing (sq->queue, TRUE);
gst_data_queue_flush (sq->queue);
}
res = TRUE;