[Xfce4-commits] <parole:master> Language strings fix.
Sean Davis
noreply at xfce.org
Sat Jan 26 14:50:01 CET 2013
Updating branch refs/heads/master
to 120006e24102ea741f14a2fc4634a7090e355626 (commit)
from 532c37719e1232004f5067731277e31e4ad9c45d (commit)
commit 120006e24102ea741f14a2fc4634a7090e355626
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Jan 26 08:49:55 2013 -0500
Language strings fix.
src/gst/parole-gst.c | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index d5cfe2a..47f41a3 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -2796,14 +2796,19 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
i, &tags);
if (tags) {
- gchar *lc = NULL, *cd = NULL;
-
+ gchar *lc = NULL, *cd = NULL, *language_name = NULL;
+
gst_tag_list_get_string (tags, GST_TAG_LANGUAGE_CODE, &lc);
gst_tag_list_get_string (tags, GST_TAG_CODEC, &cd);
if (lc) {
- lc = g_strdup(gst_tag_get_language_name(lc));
- ret = g_list_prepend (ret, lc);
+ language_name = g_strdup(gst_tag_get_language_name(lc));
+ if (language_name)
+ {
+ ret = g_list_prepend (ret, language_name);
+ }
+ else
+ ret = g_list_prepend (ret, lc);
g_free (cd);
} else if (cd) {
ret = g_list_prepend (ret, cd);
@@ -2835,21 +2840,26 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
i, &tags);
if (tags) {
- gchar *lc = NULL, *cd = NULL;
+ gchar *lc = NULL, *cd = NULL, *language_name = NULL;
gst_tag_list_get_string (tags, GST_TAG_LANGUAGE_CODE, &lc);
gst_tag_list_get_string (tags, GST_TAG_CODEC, &lc);
if (lc) {
- lc = g_strdup(gst_tag_get_language_name(lc));
- ret = g_list_prepend (ret, lc);
+ language_name = g_strdup(gst_tag_get_language_name(lc));
+ if (language_name)
+ {
+ ret = g_list_prepend (ret, language_name);
+ }
+ else
+ ret = g_list_prepend (ret, lc);
g_free (cd);
} else if (cd) {
ret = g_list_prepend (ret, cd);
} else {
ret = g_list_prepend (ret, g_strdup_printf (_("Subtitle #%d"), num++));
}
- gst_tag_list_free (tags);
+ gst_tag_list_free (tags);
} else {
ret = g_list_prepend (ret, g_strdup_printf (_("Subtitle #%d"), num++));
}
More information about the Xfce4-commits
mailing list