[FFmpeg-devel] [PATCH 1/2] avformat/isom: update mov_mdhd_language_map

Zhao Zhili quinkblack at foxmail.com
Sat Jun 27 06:22:49 EEST 2020


This is a map from 'Macintosh Language Codes' to 'ISO639-2/T'. Some items
in the map are ISO639-2/B, some are ISO639-1.

German: ger => deu
Dutch: dut = nld
Swedish: sve => swe
Icelandic: ice => isl
Croatian: hr => hrv
Chinese: chi => zho
Faroese: fo => fao
Farsi/Persian: "" => fas
Flemish: "" => nld
Irish: iri => gle
Albanian: alb => sqi
Serbian: sr => srp
Macedonian: mac => mkd
Armenian: arm => hye
Georgian: geo => kat
MongolianCyr: "" => mon
Tibetan: tib => bod
Punjabi: pa => pan
Sinhala: "" => sin
Burmese: bur => mya
Kinyarwanda: "" => kin
Nyanja: "" => nya
Welsh: wel => cym
Basque: baq => eus
---
 libavformat/isom.c | 39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index 44c7b13038..e34d3f2195 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -395,24 +395,33 @@ const AVCodecTag ff_codec_movdata_tags[] = {
 /* http://developer.apple.com/documentation/mac/Text/Text-368.html */
 /* deprecated by putting the code as 3*5 bits ASCII */
 static const char mov_mdhd_language_map[][4] = {
-    /* 0-9 */
-    "eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",
-    "heb", "jpn", "ara", "fin", "gre", "ice", "mlt", "tur", "hr "/*scr*/, "chi"/*ace?*/,
-    "urd", "hin", "tha", "kor", "lit", "pol", "hun", "est", "lav",    "",
-    "fo ",    "", "rus", "chi",    "", "iri", "alb", "ron", "ces", "slk",
-    "slv", "yid", "sr ", "mac", "bul", "ukr", "bel", "uzb", "kaz", "aze",
-    /*?*/
-    "aze", "arm", "geo", "mol", "kir", "tgk", "tuk", "mon",    "", "pus",
-    "kur", "kas", "snd", "tib", "nep", "san", "mar", "ben", "asm", "guj",
-    "pa ", "ori", "mal", "kan", "tam", "tel",    "", "bur", "khm", "lao",
-    /*                   roman? arabic? */
+    /*  0: [English] [French] [German] [Italian] [Dutch] [Swedish] [Spanish] [Danish] [Portuguese] [Norwegian] */
+    "eng", "fra", "deu", "ita", "nld", "swe", "spa", "dan", "por", "nor",
+    /* 10: [Hebrew] [Japanese] [Arabic] [Finnish] [Greek] [Icelandic] [Maltese] [Turkish] [Croatian] [Traditional Chinese] */
+    "heb", "jpn", "ara", "fin", "gre", "isl", "mlt", "tur", "hrv", "zho",
+    /* 20: [Urdu] [Hindi] [Thai] [Korean] [Lithuanian] [Polish] [Hungarian] [Estonian] [Latvian] [Sami] */
+    "urd", "hin", "tha", "kor", "lit", "pol", "hun", "est", "lav",  "",
+    /* 30: [Faroese] [Farsi/Persian] [Russian] [Simplified Chinese] [Flemish] [Irish] [Albanian] [Romanian] [Czech] [Slovak] */
+    "fao", "fas", "rus", "zho", "nld", "gle", "sqi", "ron", "ces", "slk",
+    /* 40: [Slovenian] [Yiddish] [Serbian] [Macedonian] [Bulgarian] [Ukrainian] [Belarusian] [Uzbek] [Kazakh] [Azerbaijani] */
+    "slv", "yid", "srp", "mkd", "bul", "ukr", "bel", "uzb", "kaz", "aze",
+    /* 50: [AzerbaijanAr] [Armenian] [Georgian] [Moldavian] [Kirghiz] [Tajiki] [Turkmen] [Mongolian] [MongolianCyr] [Pashto] */
+    "aze", "hye", "kat", "mol", "kir", "tgk", "tuk", "mon", "mon", "pus",
+    /* 60: [Kurdish] [Kashmiri] [Sindhi] [Tibetan] [Nepali] [Sanskrit] [Marathi] [Bengali] [Assamese] [Gujarati] */
+    "kur", "kas", "snd", "bod", "nep", "san", "mar", "ben", "asm", "guj",
+    /* 70: [Punjabi] [Oriya] [Malayalam] [Kannada] [Tamil] [Telugu] [Sinhala] [Burmese] [Khmer] [Lao] */
+    "pan", "ori", "mal", "kan", "tam", "tel", "sin", "mya", "khm", "lao",
+    /* 80: [Vietnamese] [Indonesian] [Tagalog] [MalayRoman] [MalayArabic] [Amharic] [Galla] [Oromo] [Somali] [Swahili] */
     "vie", "ind", "tgl", "may", "may", "amh", "tir", "orm", "som", "swa",
-    /*==rundi?*/
-       "", "run",    "", "mlg", "epo",    "",    "",    "",    "",    "",
-    /* 100 */
+    /* 90: [Kinyarwanda] [Rundi] [nya] [Malagasy] [Esperanto]  */
+       "kin", "run", "nya", "mlg", "epo", "",    "",    "",    "",    "",
+    /* 100: */
        "",    "",    "",    "",    "",    "",    "",    "",    "",    "",
+    /* 110: */
        "",    "",    "",    "",    "",    "",    "",    "",    "",    "",
-       "",    "",    "",    "",    "",    "",    "",    "", "wel", "baq",
+    /* 120:                                                 [Welsh] [Basque] */
+       "",    "",    "",    "",    "",    "",    "",    "", "cym", "eus",
+    /* 130: [Catalan] [Latin] [Quechua] [Guarani] [Aymara] [Tatar] [Uighur] [Dzongkha] [JavaneseRom] */
     "cat", "lat", "que", "grn", "aym", "tat", "uig", "dzo", "jav"
 };
 
-- 
2.25.1



More information about the ffmpeg-devel mailing list