From 43524d637c7d03663638bacbae21f743350bf285 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 26 Dec 2015 13:19:01 +0000 Subject: [PATCH] parsebin: maintain original order when creating fallback stream collection --- gst/playback/gstparsebin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstparsebin.c b/gst/playback/gstparsebin.c index 6eb0a84..72d7ba6 100644 --- a/gst/playback/gstparsebin.c +++ b/gst/playback/gstparsebin.c @@ -3750,7 +3750,10 @@ build_fallback_collection (GstParseChain * chain, if (!group) return; - for (l = group->children; l; l = l->next) { + + /* we used g_list_prepend when adding children, so iterate from last + * to first to maintain the original order they were added in */ + for (l = g_list_last (group->children); l != NULL; l = l->prev) { GstParseChain *childchain = l->data; build_fallback_collection (childchain, collection); -- 2.7.4