This function uses main_input and current_group_id which are protected
by the input lock.
Some calls were already safe but not all.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3702>
return ret;
}
+/* CALL with INPUT LOCK */
static void
recalculate_group_id (GstDecodebin3 * dbin)
{
GST_DEBUG_OBJECT (dbin, "Resetting %" GST_PTR_FORMAT, input->parsebin);
+ INPUT_LOCK (dbin);
GST_STATE_LOCK (dbin);
gst_element_set_state (input->parsebin, GST_STATE_NULL);
input->drained = FALSE;
}
gst_element_sync_state_with_parent (input->parsebin);
GST_STATE_UNLOCK (dbin);
+ INPUT_UNLOCK (dbin);
}
/* Make sure group ids will be recalculated */
input->group_id = GST_GROUP_ID_INVALID;
+ INPUT_LOCK (dbin);
recalculate_group_id (dbin);
+ INPUT_UNLOCK (dbin);
break;
}
case GST_EVENT_STREAM_COLLECTION: