From patchwork Sat Jun 27 14:26:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 20646 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 20CBA44A561 for ; Sat, 27 Jun 2020 17:28:10 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 08EFF68B64F; Sat, 27 Jun 2020 17:28:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from qq.com (out203-205-221-153.mail.qq.com [203.205.221.153]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FD0E68B485 for ; Sat, 27 Jun 2020 17:28:02 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1593268077; bh=8nv3riLvQ7ebRRwcsSGcsGSpgc8n6m1L/Z2f4EQJ4DA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sxbVSwXaRzyavQxtN+oc/yUcznMpd9jOLXAFSvCb1r1qopjLdjw0dM3yQo+zAZZ3x jMYGLn91tUN2Ft23m+XZH+HCf2WSB+ZPD7ZJ2pXvQqZEQRHkW/A2S0+D1lJeXiNPDZ P+7OySzU6BhW34Y/Cuz6tk+o4eGHejX4cjOoRtlE= Received: from localhost.localdomain ([27.46.106.230]) by newxmesmtplogicsvrszc6.qq.com (NewEsmtp) with SMTP id 6AF3ACA0; Sat, 27 Jun 2020 22:26:47 +0800 X-QQ-mid: xmsmtpt1593268007tc9bxrjqb Messag-ID: X-QQ-XMAILINFO: N8xcK6y/s7QNeri7T58IYNZMkOw4t/mHXYuNgrsrf7cobu2+Ahsacj15F48c9U 9vTMd47ZYRqtlc76TBkKSyQTt/MTIjHTj9+xhWjoOolQvYqS9L/3leZg1UsdYGi0ZLr98udf9EnS ciK9t5CLfuiODSOvlgEo+g0QErcawGZg63NhqNCwqHzIeeCOwwyOsGIrm5ah7ESGKdc+gywklCze k3CrPk+KcJFSTvq/bJfTlRLiJhZVHlaIIrXhQpLcAM3q6gb7W8LnMwVbaZeV6H9PBkf3Z/yMuXCw 5EoooQuTvbpw07EOVsQJdieapfgJpDA4Vzg3U6Q0/HRC77Oc9ToG6GgYWv6KMfgWNcf3Tplqaqkt vRT0ZM0kRHt++zsNvkJzdscYI9Z6eIRtNhWbWhSXx5Vo6qCHZHBuCZYztfsl9fc6Q+JJmRyWzcSp E0EEOv8WHb6ZpaPO4MOZDZ3BfW1RAvbdmpY/12uWTjOgXO40OSgu71Rn9V32YmYOMR4OzbHz/fDS 28ysDbSWsBxhiF9dbgFe1oPj3TJ0S5ozqo0kMiwGxvVlud93tKeF3RvJPLMZXg0ptG4BFp9fIcWy obSFCkdWtr/zEHKteQ+xMrjrGqHab7E1NCkEN5T/z9QJtk3Dj4t73AygIi8Ksbn1Rfr5QRU7zPdr sRP3+hHKWdDm/gJmGEPcwCLjThdMQoi5fIf+y4ez6G77hrW9TDooEIzQJbUYYdhdueBbhk493iv+ KmDxIhBPNYycY= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Sat, 27 Jun 2020 22:26:43 +0800 X-OQ-MSGID: <20200627142645.158676-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/3] avformat/isom: add comment to mov_mdhd_language_map X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Message-Id: <20200627142810.08EFF68B64F@ffbox0-bg.mplayerhq.hu> --- The following code is used to do the reformat: https://gist.github.com/quink-black/8643d8fab8b3f49ff6ace6916111d2c4 libavformat/isom.c | 158 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 139 insertions(+), 19 deletions(-) diff --git a/libavformat/isom.c b/libavformat/isom.c index 44c7b13038..209bbac5d1 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -395,25 +395,145 @@ 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? */ - "vie", "ind", "tgl", "may", "may", "amh", "tir", "orm", "som", "swa", - /*==rundi?*/ - "", "run", "", "mlg", "epo", "", "", "", "", "", - /* 100 */ - "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "wel", "baq", - "cat", "lat", "que", "grn", "aym", "tat", "uig", "dzo", "jav" + "eng", /* 0 English */ + "fra", /* 1 French */ + "ger", /* 2 German */ + "ita", /* 3 Italian */ + "dut", /* 4 Dutch */ + "sve", /* 5 Swedish */ + "spa", /* 6 Spanish */ + "dan", /* 7 Danish */ + "por", /* 8 Portuguese */ + "nor", /* 9 Norwegian */ + "heb", /* 10 Hebrew */ + "jpn", /* 11 Japanese */ + "ara", /* 12 Arabic */ + "fin", /* 13 Finnish */ + "gre", /* 14 Greek */ + "ice", /* 15 Icelandic */ + "mlt", /* 16 Maltese */ + "tur", /* 17 Turkish */ + "hr ", /* 18 Croatian */ + "chi", /* 19 Traditional Chinese */ + "urd", /* 20 Urdu */ + "hin", /* 21 Hindi */ + "tha", /* 22 Thai */ + "kor", /* 23 Korean */ + "lit", /* 24 Lithuanian */ + "pol", /* 25 Polish */ + "hun", /* 26 Hungarian */ + "est", /* 27 Estonian */ + "lav", /* 28 Latvian */ + "", /* 29 Sami */ + "fo ", /* 30 Faroese */ + "", /* 31 Farsi */ + "rus", /* 32 Russian */ + "chi", /* 33 Simplified Chinese */ + "", /* 34 Flemish */ + "iri", /* 35 Irish */ + "alb", /* 36 Albanian */ + "ron", /* 37 Romanian */ + "ces", /* 38 Czech */ + "slk", /* 39 Slovak */ + "slv", /* 40 Slovenian */ + "yid", /* 41 Yiddish */ + "sr ", /* 42 Serbian */ + "mac", /* 43 Macedonian */ + "bul", /* 44 Bulgarian */ + "ukr", /* 45 Ukrainian */ + "bel", /* 46 Belarusian */ + "uzb", /* 47 Uzbek */ + "kaz", /* 48 Kazakh */ + "aze", /* 49 Azerbaijani */ + "aze", /* 50 AzerbaijanAr */ + "arm", /* 51 Armenian */ + "geo", /* 52 Georgian */ + "mol", /* 53 Moldavian */ + "kir", /* 54 Kirghiz */ + "tgk", /* 55 Tajiki */ + "tuk", /* 56 Turkmen */ + "mon", /* 57 Mongolian */ + "", /* 58 MongolianCyr */ + "pus", /* 59 Pashto */ + "kur", /* 60 Kurdish */ + "kas", /* 61 Kashmiri */ + "snd", /* 62 Sindhi */ + "tib", /* 63 Tibetan */ + "nep", /* 64 Nepali */ + "san", /* 65 Sanskrit */ + "mar", /* 66 Marathi */ + "ben", /* 67 Bengali */ + "asm", /* 68 Assamese */ + "guj", /* 69 Gujarati */ + "pa ", /* 70 Punjabi */ + "ori", /* 71 Oriya */ + "mal", /* 72 Malayalam */ + "kan", /* 73 Kannada */ + "tam", /* 74 Tamil */ + "tel", /* 75 Telugu */ + "", /* 76 Sinhala */ + "bur", /* 77 Burmese */ + "khm", /* 78 Khmer */ + "lao", /* 79 Lao */ + "vie", /* 80 Vietnamese */ + "ind", /* 81 Indonesian */ + "tgl", /* 82 Tagalog */ + "may", /* 83 MalayRoman */ + "may", /* 84 MalayArabic */ + "amh", /* 85 Amharic */ + "tir", /* 86 Galla */ + "orm", /* 87 Oromo */ + "som", /* 88 Somali */ + "swa", /* 89 Swahili */ + "", /* 90 Kinyarwanda */ + "run", /* 91 Rundi */ + "", /* 92 Nyanja */ + "mlg", /* 93 Malagasy */ + "epo", /* 94 Esperanto */ + "", /* 95 */ + "", /* 96 */ + "", /* 97 */ + "", /* 98 */ + "", /* 99 */ + "", /* 100 */ + "", /* 101 */ + "", /* 102 */ + "", /* 103 */ + "", /* 104 */ + "", /* 105 */ + "", /* 106 */ + "", /* 107 */ + "", /* 108 */ + "", /* 109 */ + "", /* 110 */ + "", /* 111 */ + "", /* 112 */ + "", /* 113 */ + "", /* 114 */ + "", /* 115 */ + "", /* 116 */ + "", /* 117 */ + "", /* 118 */ + "", /* 119 */ + "", /* 120 */ + "", /* 121 */ + "", /* 122 */ + "", /* 123 */ + "", /* 124 */ + "", /* 125 */ + "", /* 126 */ + "", /* 127 */ + "wel", /* 128 Welsh */ + "baq", /* 129 Basque */ + "cat", /* 130 Catalan */ + "lat", /* 131 Latin */ + "que", /* 132 Quechua */ + "grn", /* 133 Guarani */ + "aym", /* 134 Aymara */ + "tat", /* 135 Tatar */ + "uig", /* 136 Uighur */ + "dzo", /* 137 Dzongkha */ + "jav", /* 138 JavaneseRom */ }; int ff_mov_iso639_to_lang(const char lang[4], int mp4)