decodebin3: Don't take the lock when creating a new input

We only need to take the input lock when adding/removing
inputs from the list.
This commit is contained in:
Edward Hervey 2017-10-04 17:42:45 +02:00 committed by Edward Hervey
parent fa9adbe986
commit fa710a59aa

View file

@ -940,13 +940,13 @@ gst_decodebin3_request_new_pad (GstElement * element, GstPadTemplate * temp,
/* We are ignoring names for the time being, not sure it makes any sense /* We are ignoring names for the time being, not sure it makes any sense
* within the context of decodebin3 ... */ * within the context of decodebin3 ... */
INPUT_LOCK (dbin);
input = create_new_input (dbin, FALSE); input = create_new_input (dbin, FALSE);
if (input) { if (input) {
INPUT_LOCK (dbin);
dbin->other_inputs = g_list_append (dbin->other_inputs, input); dbin->other_inputs = g_list_append (dbin->other_inputs, input);
res = input->ghost_sink; res = input->ghost_sink;
}
INPUT_UNLOCK (dbin); INPUT_UNLOCK (dbin);
}
return res; return res;
} }