@@ -59,6 +59,17 @@ static constexpr const MatroskaProfile VERSION_MATROSKA_UP_TO_V2 = {false, false
5959static constexpr const MatroskaProfile VERSION_MATROSKA_UP_TO_V3 = {false, false, 0, 3};
6060// available since version 1, 2, 3 and 4 of Matroska and WebM but not DivX
6161static constexpr const MatroskaProfile VERSION_WEBM_UP_TO_V4 = {true, false, 0, 4};
62+
63+ static inline bool ValidateBinary4(std::uint64_t Size)
64+ {
65+ return Size == 4;
66+ }
67+
68+ static inline bool ValidateBinary16(std::uint64_t Size)
69+ {
70+ return Size == 16;
71+ }
72+
6273<xsl : for-each select =" ebml:element[not(starts-with(@path,'\EBML\'))]" >
6374 <!-- sorting messes the detection of the previous element MATROSKA_VERSION state -->
6475 <!-- Maybe for each output we create we also create a counterpart call to check if the new MATROSKA_VERSION state that should be used -->
@@ -176,6 +187,13 @@ static constexpr const MatroskaProfile VERSION_WEBM_UP_TO_V4 = {true, false, 0,
176187 <xsl : call-template name =" output-display-name" >
177188 <xsl : with-param name =" node" select =" ." />
178189 </xsl : call-template >
190+ <xsl : choose >
191+ <xsl : when test =" @length=4" ><xsl : text >, ValidateBinary4</xsl : text ></xsl : when >
192+ <xsl : when test =" @length=16" ><xsl : text >, ValidateBinary16</xsl : text ></xsl : when >
193+ <xsl : when test =" @name='Block' or @name='SimpleBlock' or @name='BlockVirtual'" ><xsl : text >, KaxInternalBlock::SizeIsValid</xsl : text ></xsl : when >
194+ <xsl : when test =" not(@length)" ><xsl : text >, libebml::EbmlCallbacks::AnySizeValid</xsl : text ></xsl : when >
195+ <xsl : otherwise ><xsl : text >, false</xsl : text ></xsl : otherwise >
196+ </xsl : choose >
179197 <xsl : call-template name =" output-minmax" >
180198 <xsl : with-param name =" node" select =" ." />
181199 </xsl : call-template >
0 commit comments