From 1f863e6d6d1ba8aee084cf700215451fe65d76eb Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 25 Mar 2021 10:29:41 +0100 Subject: [PATCH] decodebin3: Don't insert duplicated streams in collection Filter out the ones which are already present. Can happen with several input stream which have identical collections Part-of: --- gst/playback/gstdecodebin3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstdecodebin3.c b/gst/playback/gstdecodebin3.c index 48d2c847f..1a242252d 100644 --- a/gst/playback/gstdecodebin3.c +++ b/gst/playback/gstdecodebin3.c @@ -1302,7 +1302,9 @@ get_merged_collection (GstDecodebin3 * dbin) for (i = 0; i < nb_stream; i++) { GstStream *stream = gst_stream_collection_get_stream (input->collection, i); - unsorted_streams = g_list_append (unsorted_streams, stream); + /* Only add if not already present in the list */ + if (!g_list_find (unsorted_streams, stream)) + unsorted_streams = g_list_append (unsorted_streams, stream); } } }