-
Notifications
You must be signed in to change notification settings - Fork 45
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block/SimpleBlock size equations are wrong #213
Comments
To mention is that the value of the timestamp Bytes are milliseconds. And strictly speaking, it is not a timestamp. It is time shift and with the timestamp of the Cluster and this time shift you can create a timestamp. |
You are wrong. It needn't be milliseconds. The scale of (most) time related elements in a Matroska file is determined by the |
It is indeed a weird and confusing notation! As well as the subtraction |
The notation |
I fully agree with using common notations, like |
|
Then we should stick to what we're already using. As a matter of fact, I think we should just replace that whole formula with the enumeration I've given in the original submission, maybe supplemented by a sentence such as "The minimum number of bytes is therefore 6 in the case of a track number < 128 and no lacing." |
+1 for the enumeration (it’s much clearer!) |
I'll prepare a PR tonight. |
Not obvious, but looks like IETF uses same, in Opus specs found 1 iteration:
Edit: argh, too late, looks like everyone is fine with double dot in that case. |
There is one thing which is not correct. To describe the Bytes for the binary value of the (Simple)Block the minimum is 4 not 6. No other Matroska Element data will be described with the start of his own ElementID and his size. As an example: ChapProcessData -> binary @mkver |
This is wrong. The calculation is:
|
The specs say the following in the section "Block Structure" and "SimpleBlock structure":
This is, at beast, highly misleading and unclear, and at worst, just wrong.
Better numbers would be:
My guess is that the
1
in the equation refers to the element ID, the first4
is supposed to be the combination of track number, relative timestamp & flags (however, that is wrong if the track number is >= 128), and I have no idea what the(4 + (4))
is supposed to convey.It's true that the minimum number of bytes is 6, but it's completely false that the maximum number of octets is 21. Due to how lacing works, especially the incredibly bad Xiph lacing, the number of bytes doesn't really have an upper bound.
The same applies to the
SimpleBlock
structure & equation.The text was updated successfully, but these errors were encountered: