summaryrefslogtreecommitdiffstats
path: root/TOOLS/matroska.py
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-04-16 05:27:46 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-04-16 19:51:22 +0200
commitab3b1744b9a6c7cc33e16538e175af2b00d3c2e3 (patch)
tree710501117b64503483381ba5d5dc5305e6e7524b /TOOLS/matroska.py
parent2babe02f0f58711d19f3cd412fe84a41bf3946fd (diff)
downloadmpv-ab3b1744b9a6c7cc33e16538e175af2b00d3c2e3.tar.bz2
mpv-ab3b1744b9a6c7cc33e16538e175af2b00d3c2e3.tar.xz
demux_mkv: add BCP 47 language tags support
Section 12 of Matroska Media Container Format Specifications says: If a BCP 47 Language Element and an ISO 639-2 Language Element are used within the same Parent Element, then the ISO 639-2 Language Element MUST be ignored and precedence given to the BCP 47 Language Element. Fixes: #8144
Diffstat (limited to 'TOOLS/matroska.py')
-rwxr-xr-xTOOLS/matroska.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/TOOLS/matroska.py b/TOOLS/matroska.py
index 52bac48c92..61a33ffb84 100755
--- a/TOOLS/matroska.py
+++ b/TOOLS/matroska.py
@@ -92,6 +92,7 @@ elements_matroska = (
'MaxBlockAdditionID, 55ee, uint',
'Name, 536e, str',
'Language, 22b59c, str',
+ 'LanguageBCP47, 22b59d, str',
'CodecID, 86, str',
'CodecPrivate, 63a2, binary',
'CodecName, 258688, str',
@@ -206,6 +207,7 @@ elements_matroska = (
'ChapterDisplay*, 80, sub', (
'ChapString, 85, str',
'ChapLanguage*, 437c, str',
+ 'ChapLanguageBCP47*, 437d, str',
'ChapCountry*, 437e, str',
),
),
@@ -224,6 +226,7 @@ elements_matroska = (
'SimpleTag*, 67c8, sub', (
'TagName, 45a3, str',
'TagLanguage, 447a, str',
+ 'TagLanguageBCP47, 447b, str',
'TagString, 4487, str',
'TagDefault, 4484, uint',
),