queue: Don't hold the queue mutex while doing serialized queries downstream

https://bugzilla.gnome.org/show_bug.cgi?id=702520
This commit is contained in:
Sebastian Dröge 2013-06-19 10:53:21 +02:00
parent 4fc1ba1e60
commit 2f8e572887

View file

@ -1180,8 +1180,12 @@ next:
}
} else if (GST_IS_QUERY (data)) {
GstQuery *query = GST_QUERY_CAST (data);
gboolean ret;
queue->last_query = gst_pad_peer_query (queue->srcpad, query);
GST_QUEUE_MUTEX_UNLOCK (queue);
ret = gst_pad_peer_query (queue->srcpad, query);
GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing_query);
queue->last_query = ret;
g_cond_signal (&queue->query_handled);
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
"did query %p, return %d", query, queue->last_query);
@ -1200,6 +1204,13 @@ out_flushing:
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing");
return GST_FLOW_FLUSHING;
}
out_flushing_query:
{
queue->last_query = FALSE;
g_cond_signal (&queue->query_handled);
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing");
return GST_FLOW_FLUSHING;
}
}
static void