From 00b55914e0e9429f5272f441c2fa0f3719b62e37 Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Mon, 2 Dec 2024 17:07:03 +1000 Subject: [PATCH] =?UTF-8?q?MatroskaSplitter=20-=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=BA=D0=B0=20=D0=BF=D0=B0=D1=80=D1=81=D0=B8=D0=BD?= =?UTF-8?q?=D0=B3=D0=B0=20BCP47=20language=20tag,=20=D0=BF=D0=BE=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B5=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D1=83=D0=B5=D1=82=D1=81=D1=8F.=20=D0=9A=D0=BE=D1=81?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D0=B8=D0=BA=D0=B0/=D0=BA=D0=BE=D1=80=D1=80?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parser/MatroskaSplitter/MatroskaFile.cpp | 12 +++++++++++- .../parser/MatroskaSplitter/MatroskaFile.h | 19 +++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp b/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp index fdc619bbac..d3c5c9ae6c 100644 --- a/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp +++ b/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2023 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -461,6 +461,9 @@ HRESULT TrackEntry::Parse(CMatroskaNode* pMN0) case 0x22B59C: Language.Parse(pMN); break; + case 0x22B59D: + LanguageBCP47.Parse(pMN); + break; case 0x86: CodecID.Parse(pMN); break; @@ -1188,6 +1191,9 @@ HRESULT ChapterDisplay::Parse(CMatroskaNode* pMN0) case 0x437C: ChapLanguage.Parse(pMN); break; + case 0x437D: + ChapLanguageBCP47.Parse(pMN); + break; case 0x437E: ChapCountry.Parse(pMN); break; @@ -1208,6 +1214,7 @@ HRESULT Tag::Parse(CMatroskaNode* pMN0) BeginChunk case 0x67C8: SimpleTag.Parse(pMN); + break; case 0x63C0: Targets.Parse(pMN); break; @@ -1223,6 +1230,9 @@ HRESULT SimpleTag::Parse(CMatroskaNode* pMN0) case 0x447A: TagLanguage.Parse(pMN); break; + case 0x447B: + TagLanguageBCP47.Parse(pMN); + break; case 0x4487: TagString.Parse(pMN); break; diff --git a/src/filters/parser/MatroskaSplitter/MatroskaFile.h b/src/filters/parser/MatroskaSplitter/MatroskaFile.h index ef7b81644a..bc106f8a60 100644 --- a/src/filters/parser/MatroskaSplitter/MatroskaFile.h +++ b/src/filters/parser/MatroskaSplitter/MatroskaFile.h @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2023 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -461,7 +461,8 @@ namespace MatroskaReader CUInt FlagEnabled, FlagDefault, FlagLacing, FlagForced; CUInt MinCache, MaxCache; CUTF8 Name; - CANSI Language; + CANSI Language{ "eng" }; + CANSI LanguageBCP47; CBinary CodecID; CBinary CodecPrivate; CUTF8 CodecName; @@ -488,7 +489,6 @@ namespace MatroskaReader FlagForced.Set(0); MinCache.Set(0); TrackTimecodeScale.Set(1.0f); - Language.CStringA::operator = ("eng"); MaxBlockAdditionID.Set(0); CodecDecodeAll.Set(1); } @@ -574,12 +574,10 @@ namespace MatroskaReader { public: CUTF8 ChapString; - CANSI ChapLanguage; + CANSI ChapLanguage{ "eng" }; + CANSI ChapLanguageBCP47; CANSI ChapCountry; - ChapterDisplay() { - ChapLanguage.CStringA::operator = ("eng"); - } HRESULT Parse(CMatroskaNode* pMN); }; @@ -636,13 +634,10 @@ namespace MatroskaReader { public: CUTF8 TagName; - CANSI TagLanguage; + CANSI TagLanguage{ "und" }; + CANSI TagLanguageBCP47; CUTF8 TagString; - SimpleTag() { - TagLanguage.CStringA::operator = ("eng"); - } - HRESULT Parse(CMatroskaNode* pMN); };