From 4ef9bf10198a6d01a996213c5f95b529086d4001 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 8 Dec 2010 11:52:31 +0200 Subject: [PATCH] registry: maintain the typefind extension list order --- gst/gstregistrychunks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/gstregistrychunks.c b/gst/gstregistrychunks.c index b34dcfa4c0..e3081747f2 100644 --- a/gst/gstregistrychunks.c +++ b/gst/gstregistrychunks.c @@ -656,9 +656,10 @@ gst_registry_chunks_load_feature (GstRegistry * registry, gchar ** in, GST_DEBUG ("Reading %d Typefind extensions at address %p", tff->nextensions, *in); factory->extensions = g_new0 (gchar *, tff->nextensions + 1); - for (i = 0; i < tff->nextensions; i++) { + /* unpack in reverse order to maintain the correct order */ + for (i = tff->nextensions; i > 0; i--) { unpack_string (*in, str, end, fail); - factory->extensions[i] = str; + factory->extensions[i - 1] = str; } } } else if (GST_IS_INDEX_FACTORY (feature)) {