[totem/wip/hadess/lang-menus: 2/6] main: Fix "und" subtitle or audio track in menus



commit fd088ba09ebdce3282563a3c172358693e766913
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Feb 13 23:16:16 2019 +0100

    main: Fix "und" subtitle or audio track in menus
    
    "und" means "Defaut languague" in Matroska containers:
    https://matroska.org/technical/specs/tagging/index.html
    so assume this means English, as it does in VLC.

 src/totem-menu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/totem-menu.c b/src/totem-menu.c
index 119b3dfd8..57fc8e547 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -398,7 +398,10 @@ add_lang_action (GMenu *menu,
        const char *full_lang;
        char *label;
 
-       full_lang = gst_tag_get_language_name (lang);
+       if (g_str_equal (lang, "und"))
+               full_lang = gst_tag_get_language_name ("eng");
+       else
+               full_lang = gst_tag_get_language_name (lang);
 
        if (lang_index > 1) {
                char *num_lang;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]