urisourcebin: Clear pad from pending list if it was linked
authorSeungha Yang <sh.yang@lge.com>
Wed, 11 Jan 2017 03:35:40 +0000 (12:35 +0900)
committerJan Schmidt <jan@centricular.com>
Wed, 11 Jan 2017 09:19:45 +0000 (20:19 +1100)
If not, the other slots might try to link the pad again.
This can happen when the demuxer has multiple src pads
and their caps are identical

https://bugzilla.gnome.org/show_bug.cgi?id=777121

gst/playback/gsturisourcebin.c

index 2c0d64936adb9b4b7973a3d88da0b7cdd6b80457..6ca85a5d22d3f053cb6ad3c238f9be64613cdfba 100644 (file)
@@ -1049,6 +1049,8 @@ link_pending_pad_to_output (GstURISourceBin * urisrc, OutputSlotInfo * slot)
       out_info->output_slot = slot;
       slot->linked_info = out_info;
       res = TRUE;
+      urisrc->pending_pads =
+          g_list_remove (urisrc->pending_pads, out_info->demux_src_pad);
     } else {
       GST_ERROR_OBJECT (urisrc,
           "Failed to link new demuxer pad to the output slot we tried");