mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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:
parent
4fc1ba1e60
commit
2f8e572887
1 changed files with 12 additions and 1 deletions
|
@ -1180,8 +1180,12 @@ next:
|
||||||
}
|
}
|
||||||
} else if (GST_IS_QUERY (data)) {
|
} else if (GST_IS_QUERY (data)) {
|
||||||
GstQuery *query = GST_QUERY_CAST (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);
|
g_cond_signal (&queue->query_handled);
|
||||||
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
|
||||||
"did query %p, return %d", query, queue->last_query);
|
"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");
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing");
|
||||||
return GST_FLOW_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
|
static void
|
||||||
|
|
Loading…
Reference in a new issue