Skip to content

Commit

Permalink
decodebin3: Don't insert duplicated streams in collection
Browse files Browse the repository at this point in the history
Filter out the ones which are already present. Can happen with several input
stream which have identical collections

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1083>
  • Loading branch information
bilboed authored and GStreamer Marge Bot committed Mar 25, 2021
1 parent e39d57b commit 1f863e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gst/playback/gstdecodebin3.c
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 1f863e6

Please sign in to comment.