-
Notifications
You must be signed in to change notification settings - Fork 47
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
Only allow some specific Master elements to be set as infinite #176
Commits on Dec 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cc9a564 - Browse repository at this point
Copy the full SHA cc9a564View commit details
Commits on Dec 20, 2023
-
Initialize each EbmlElement with its EbmlCallbacks
So we have access to the semantic constraints in the constructor.
Configuration menu - View commit details
-
Copy full SHA for 73336f6 - Browse repository at this point
Copy the full SHA 73336f6View commit details -
Keep information about elements that can have an infinite size
Only master elements can and only very few.
Configuration menu - View commit details
-
Copy full SHA for 1096eb9 - Browse repository at this point
Copy the full SHA 1096eb9View commit details -
Only set infinite size if it's allowed for that EBML Element class
And assert if an illegal call is done.
Configuration menu - View commit details
-
Copy full SHA for 8cb3382 - Browse repository at this point
Copy the full SHA 8cb3382View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8326415 - Browse repository at this point
Copy the full SHA 8326415View commit details -
Configuration menu - View commit details
-
Copy full SHA for 267901a - Browse repository at this point
Copy the full SHA 267901aView commit details -
Don't test infinite size for elements that can never be infinite
Only master elements can be.
Configuration menu - View commit details
-
Copy full SHA for 43e52eb - Browse repository at this point
Copy the full SHA 43e52ebView commit details -
Assume an EbmlVoid element cannot be inifinite
Because it's a binary element, not a Master element.
Configuration menu - View commit details
-
Copy full SHA for 587d7ff - Browse repository at this point
Copy the full SHA 587d7ffView commit details -
Document the return value of SetSizeInfinite()
Setting whatever on an EbmlMaster returns true. Setting true on other classes returns false. Setting false on other classes returns true.
Configuration menu - View commit details
-
Copy full SHA for 210a56b - Browse repository at this point
Copy the full SHA 210a56bView commit details -
Only return true when SetSizeInfinite() worked
Fixes an issue in EbmlElement::FindNextID() where an EbmlMaster was set to infinite/unknown even though it's not allowed for that element. EbmlElement::FindNextElement() would also allow an infinite/unknown size for any master element even though it's not allowed. That should improve error recovery by skipping more invalid sizes given the reading context.
Configuration menu - View commit details
-
Copy full SHA for 609fcdb - Browse repository at this point
Copy the full SHA 609fcdbView commit details -
make EbmlElement::SetSizeInfinite() non virtual
We can simplify use the semantic of each element directly. And the assert will work all any element, not just the master ones.
Configuration menu - View commit details
-
Copy full SHA for 88467bf - Browse repository at this point
Copy the full SHA 88467bfView commit details
Commits on Dec 22, 2023
-
Don't assert when calling incorrectly SetSizeInfinite()
It is called in FindNextId/FindNextElement which always checks for failure. So don't need the assert there. It's also called from the EbmlMaster constructor. The copy constructor is fine since the the original can only have a valid state. The other constructor has a default value of finite size and the macros never set this to infinite. In libmatroska the KaxSegment constructor calls SetSizeInfinite() rather than using the default value. But we don't need an assert there, since we know it's allowed.
Configuration menu - View commit details
-
Copy full SHA for ca5d9f8 - Browse repository at this point
Copy the full SHA ca5d9f8View commit details