mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
queue: remove query from queue if queue is flushing
When querying a queue that is flushing we end up adding a query to the queuearray without taking a reference to that query (because the normal functionality is to block until that query is done and discarded from the queue). This later causes problem if the query is unreffed outside of the queue before we discard the queue. There is a check to avoid unreffing any lingering query-objects, but since the query has been deleted that check fails. This commit depends on other fixes done to gst_queue_array_find() and gst_queue_array_drop_element(). https://bugzilla.gnome.org/show_bug.cgi?id=692691
This commit is contained in:
parent
ae8940e6f7
commit
09bb0c2cdb
1 changed files with 9 additions and 0 deletions
|
@ -846,7 +846,16 @@ gst_queue_handle_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
/* ERRORS */
|
||||
out_flushing:
|
||||
{
|
||||
gint index;
|
||||
|
||||
GST_DEBUG_OBJECT (queue, "we are flushing");
|
||||
|
||||
/* Remove query from queue if still there, since we hold no ref to it */
|
||||
index = gst_queue_array_find (queue->queue, NULL, query);
|
||||
|
||||
if (index >= 0)
|
||||
gst_queue_array_drop_element (queue->queue, index);
|
||||
|
||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue