mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
decodebin: Close a small race posting 100% buffering
When posting 100% buffering due to removing the last buffering element, we still need to hold the posting lock as well, to avoid any race with other elements that might post a buffering message at that exact moment
This commit is contained in:
parent
94da76d301
commit
0b6a933e01
1 changed files with 2 additions and 0 deletions
|
@ -5514,6 +5514,7 @@ gst_decode_bin_remove_element (GstBin * bin, GstElement * element)
|
|||
GList *iter;
|
||||
|
||||
BUFFERING_LOCK (bin);
|
||||
g_mutex_lock (&dbin->buffering_post_lock);
|
||||
for (iter = dbin->buffering_status; iter; iter = iter->next) {
|
||||
GstMessage *bufstats = iter->data;
|
||||
|
||||
|
@ -5536,6 +5537,7 @@ gst_decode_bin_remove_element (GstBin * bin, GstElement * element)
|
|||
gst_element_post_message (GST_ELEMENT_CAST (bin),
|
||||
gst_message_new_buffering (GST_OBJECT_CAST (dbin), 100));
|
||||
}
|
||||
g_mutex_unlock (&dbin->buffering_post_lock);
|
||||
|
||||
return GST_BIN_CLASS (parent_class)->remove_element (bin, element);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue