mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
decodebin3: Add missing INPUT_LOCK() before ensure_input_parsebin()
ensure_input_parsebin() has a top comment saying it must be called with INPUT_LOCK taken, but 2 out of 3 usages of the function call it without taking that mutex. This patch adds locking in these two remaining usages. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5279>
This commit is contained in:
parent
522704d308
commit
223b63b1d2
1 changed files with 4 additions and 0 deletions
|
@ -2159,7 +2159,9 @@ sink_event_function (GstPad * sinkpad, GstDecodebin3 * dbin, GstEvent * event)
|
|||
if (!input->parsebin && !input->identity) {
|
||||
if (gst_decodebin_input_requires_parsebin (input, newcaps)) {
|
||||
GST_DEBUG_OBJECT (sinkpad, "parsebin is required for input");
|
||||
INPUT_LOCK (dbin);
|
||||
gst_decodebin_input_ensure_parsebin (input);
|
||||
INPUT_UNLOCK (dbin);
|
||||
break;
|
||||
}
|
||||
GST_DEBUG_OBJECT (sinkpad,
|
||||
|
@ -2205,7 +2207,9 @@ sink_event_function (GstPad * sinkpad, GstDecodebin3 * dbin, GstEvent * event)
|
|||
if (segment && segment->format != GST_FORMAT_TIME && !input->parsebin) {
|
||||
GST_DEBUG_OBJECT (sinkpad,
|
||||
"Got a non-time segment, forcing parsebin handling");
|
||||
INPUT_LOCK (dbin);
|
||||
gst_decodebin_input_ensure_parsebin (input);
|
||||
INPUT_UNLOCK (dbin);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue