encoding-target: Remove useless check for local presence
authorThibault Saunier <tsaunier@gnome.org>
Thu, 15 Dec 2016 19:12:02 +0000 (16:12 -0300)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 16 Dec 2016 14:27:31 +0000 (11:27 -0300)
gst-libs/gst/pbutils/encoding-target.c

index f8a4847..755a248 100644 (file)
@@ -526,7 +526,8 @@ parse_encoding_profile (GKeyFile * in, gchar * parentprofilename,
 {
   GstEncodingProfile *sprof = NULL;
   gchar **parent;
-  gchar *proftype, *format, *preset, *restriction, *pname, *description;
+  gchar *proftype, *format, *preset, *restriction, *pname, *description,
+      *locale;
   GstCaps *formatcaps = NULL;
   GstCaps *restrictioncaps = NULL;
   gboolean variableframerate;
@@ -564,21 +565,11 @@ parse_encoding_profile (GKeyFile * in, gchar * parentprofilename,
 
   pname = g_key_file_get_value (in, profilename, "name", NULL);
 
-  /* First try to get localized description */
-  {
-    gchar *locale;
-
-    locale = get_locale ();
-    if (locale != NULL) {
-      /* will try to fall back to untranslated string if no translation found */
-      description = g_key_file_get_locale_string (in, profilename,
-          "description", locale, NULL);
-      g_free (locale);
-    } else {
-      description =
-          g_key_file_get_string (in, profilename, "description", NULL);
-    }
-  }
+  locale = get_locale ();
+  /* will try to fall back to untranslated string if no translation found */
+  description = g_key_file_get_locale_string (in, profilename,
+      "description", locale, NULL);
+  g_free (locale);
 
   /* Note: a missing description is normal for non-container profiles */
   if (description == NULL) {