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); };