[vlc-devel] [PATCH] Fixes mpeg-ts lang code retrieval in case 2T diff of 2B (example fra vs fre). Previously returned 3 question mark : ???

r3gis3r r3gis.3r at gmail.com
Tue Mar 25 13:34:53 CET 2014


From: Regis Montoya <r3gis.3r at gmail.com>

---
 modules/mux/mpeg/ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index e629a70..a2adb94 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -862,7 +862,7 @@ static const char *GetIso639_2LangCode(const char *lang)
     else
     {
         pl = GetLang_2B(lang);      /* try native code first */
-        if (!*pl->psz_iso639_2T)
+        if (!*pl->psz_iso639_2T || strncasecmp(pl->psz_iso639_2T, "???", 3) == 0)
             pl = GetLang_2T(lang);  /* else fallback to english code */
 
     }
-- 
1.8.3.2




More information about the vlc-devel mailing list