From: Tim-Philipp Müller Date: Sat, 26 Dec 2015 13:19:01 +0000 (+0000) Subject: parsebin: maintain original order when creating fallback stream collection X-Git-Tag: 1.19.3~511^2~2731 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43524d637c7d03663638bacbae21f743350bf285;p=platform%2Fupstream%2Fgstreamer.git parsebin: maintain original order when creating fallback stream collection --- 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);