Skip to content
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

Make the list of global elements non recursive #283

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

robUx4
Copy link
Contributor

@robUx4 robUx4 commented Mar 1, 2024

And rework the skipping of unknown/infinite length master elements.

With a bit more comments it's clearer what each part does. The handling of going to a parent level seems bogus.

We should be skipping data with the actual EbmlSemanticContext of that element.
No other code was executed after bEndFound was set to true to exist the loop.
We may find an upper level element in an unknown length master element.

We skip its data as well, until there's nothing to skip.
This is very suspicious.
We don't need to use the global context that contains the list of global elements.
The global element cannot be a have an unknown size and will just skip the data and return nullptr.
Either the global element needs to be found in the list of elements, or though the
callback. If the extra callback points to itself we may loop recursively on it.
Copy link
Contributor

@mbunkus mbunkus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mkvextract segfaults when reading certain files with these changes. There seems to be an infinite recursion happening with EbmlElement::SkipData() calling itself directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants