WIP: Demonstrate that pre-1504 keys are restored for large video files#1124
Closed
bertm wants to merge 5 commits intohyphanet:nextfrom
Closed
WIP: Demonstrate that pre-1504 keys are restored for large video files#1124bertm wants to merge 5 commits intohyphanet:nextfrom
bertm wants to merge 5 commits intohyphanet:nextfrom
Conversation
This way it can be mocked in tests.
The InputStream.skip() method is _not_ required to skip as many bytes as specified, or skip as many as it can, or actually skip any bytes at all; “return 0;” is a 100% valid implementation. It also is not required to actually _read_ the input stream; if e.g. `seek()`-type functionality is available, it may be used to not read anything at all but simply skip (hence the name!) to the desired offset in the stream. As the MultiHashInputStream changed its superclass from InputStream to SkipShieldingInputStream, its implementation of skip() changed, too: InputStream’s skip() actually tries to read() as many bytes as specified, only ending prematurely if the stream EOFs. SkipShieldingInputStream’s skip(), however, only reads up to 8k of data — which is rather questionable, but okay. Both implementations correctly return the number of bytes they skipped, and so, while it can be argued that MultiHashInputStream’s skip() implementation has changed its observable behaviour and should be fixed, it is in fact the _usage_ of the skip method in the InsertCompressor which is beyond any doubt incorrect. This pull request fixes the usage.
This reverts commit d956d7f.
This reverts commit dfebde4.
Contributor
|
Thank you! I’m closing to avoid accidental merging. |
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.
No description provided.