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
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;
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);
}