[totem/wip/hadess/und-lang] menu: Fix "Undetermined" appearing in menu items
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/und-lang] menu: Fix "Undetermined" appearing in menu items
- Date: Thu, 17 Sep 2020 15:50:57 +0000 (UTC)
commit d41687758f8ef052fbd8d25077e20963295916a4
Author: Bastien Nocera <hadess hadess net>
Date: Thu Sep 17 17:39:08 2020 +0200
menu: Fix "Undetermined" appearing in menu items
Due to recent changes in gst-plugins-base, some languages without a 2
letter-code are now getting mapped to languages using
gst_tag_get_language_name(). Which isn't a problem, except that we were
relying on gst_tag_get_language_name("und") returning NULL.
Check for "und" manually so that track menus get named properly.
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/785
src/totem-menu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/totem-menu.c b/src/totem-menu.c
index 20b9764db..42bc93019 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -397,9 +397,11 @@ static const char *
get_language_name_no_und (const char *lang,
BvwTrackType track_type)
{
- const char *ret;
+ const char *ret = NULL;
+
+ if (g_strcmp0 (lang, "und") != 0)
+ ret = gst_tag_get_language_name (lang);
- ret = gst_tag_get_language_name (lang);
if (ret != NULL)
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]