Repository navigation
Fix: Added ID_SEEK_HEAD parsing for MKV container. - #1604
Merged
Merged
Conversation
Note due to media3 fuckery we have to copy paste the extractorfactory and mkv parser to edit anything. To make it less of a pain they are also auto translated into kotlin.
Collaborator
Author
|
For anyone that wants to review, please try some MKV file that was not seekable in pre and try with this PR. Additionally this should not fuck up parsing, but might, so deny this PR if you find a MKV file that is playable in pre but not in this PR. Also have software encoding set to the same on both versions when testing. |
Contributor
|
Please try to push it upstream after testing |
Collaborator
Author
Might do, however I wrote this in Kotlin not Java, due to some inherit issues with Java for this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note due to media3 fuckery we have to copy paste the extractorfactory and mkv parser to edit anything. To make it less of a pain they are also auto translated into Kotlin.
This just added
seekForSeekContent,seekHeadContentPositionandseekPositionAfterSeekingForHead. Notably this only supports a single recursive query, so no nested KaxSeekHead.To detail what happens and why this is needed, the current impl only seeks to cues (timestamps) if the cue header is on the top of the file. What many real mkv editors do is to append the metadata (including cues) to the end of the file, presumably to not have to move like 1gb of media like 20kb forwards. This PR allows the header to include a SeekHead.
This means that when we parse an MKV file what really happens is:
What happened before was:
This resolves #1584