From: Thibault Saunier Date: Fri, 21 Jul 2017 20:41:26 +0000 (-0400) Subject: xml-formatter: Serialize encoding profiles in reverse order X-Git-Tag: 1.19.3~493^2~797 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=daca7acf96cba03bf7057af41aaf0df0f594b9d3;p=platform%2Fupstream%2Fgstreamer.git xml-formatter: Serialize encoding profiles in reverse order So they are reloaded in the right order. --- diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index 0fb4335..28ddf48 100644 --- a/ges/ges-xml-formatter.c +++ b/ges/ges-xml-formatter.c @@ -1399,8 +1399,10 @@ _save_encoding_profiles (GESXmlFormatter * self, GString * str, const gchar *profname, *profdesc, *profpreset, *proftype, *profpresetname; const GList *tmp; + GList *profiles = g_list_reverse (g_list_copy ((GList *) + ges_project_list_encoding_profiles (project))); - for (tmp = ges_project_list_encoding_profiles (project); tmp; tmp = tmp->next) { + for (tmp = profiles; tmp; tmp = tmp->next) { GstEncodingProfile *prof = GST_ENCODING_PROFILE (tmp->data); profname = gst_encoding_profile_get_name (prof); @@ -1447,6 +1449,7 @@ _save_encoding_profiles (GESXmlFormatter * self, GString * str, append_escaped (str, g_markup_printf_escaped (" \n")); } + g_list_free (profiles); } static GString *