urisourcebin: Unset locked state
authorEdward Hervey <edward@centricular.com>
Fri, 13 Jan 2023 15:37:03 +0000 (16:37 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 13 Jan 2023 15:41:53 +0000 (16:41 +0100)
Some elements still had it in failure cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3720>

subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c

index d3c2db3..b8366ec 100644 (file)
@@ -1934,6 +1934,10 @@ setup_parsebin_for_slot (ChildSrcPadInfo * info, GstPad * originating_pad)
 
 could_not_link:
   {
+    if (info->pre_parse_queue)
+      gst_element_set_locked_state (info->pre_parse_queue, FALSE);
+    if (info->demuxer)
+      gst_element_set_locked_state (info->demuxer, FALSE);
     GST_URI_SOURCE_BIN_UNLOCK (urisrc);
     GST_STATE_UNLOCK (urisrc);
     GST_ELEMENT_ERROR (urisrc, CORE, NEGOTIATION,
@@ -2143,6 +2147,7 @@ no_typefind:
 could_not_link:
   {
     gst_object_unref (sinkpad);
+    gst_element_set_locked_state (info->typefind, FALSE);
     GST_ELEMENT_ERROR (urisrc, CORE, NEGOTIATION,
         (NULL), ("Can't link source to typefind element"));
     return FALSE;