Commit a6f22cd9 by kimvde Committed by kim-vde

BinarySeachSeeker: mark seek finished after reading input

This allows to continue the seek in case an error is thrown when reading
from the input.

PiperOrigin-RevId: 292924295
parent 792d9b39
...@@ -203,9 +203,9 @@ public abstract class BinarySearchSeeker { ...@@ -203,9 +203,9 @@ public abstract class BinarySearchSeeker {
timestampSearchResult.timestampToUpdate, timestampSearchResult.bytePositionToUpdate); timestampSearchResult.timestampToUpdate, timestampSearchResult.bytePositionToUpdate);
break; break;
case TimestampSearchResult.TYPE_TARGET_TIMESTAMP_FOUND: case TimestampSearchResult.TYPE_TARGET_TIMESTAMP_FOUND:
skipInputUntilPosition(input, timestampSearchResult.bytePositionToUpdate);
markSeekOperationFinished( markSeekOperationFinished(
/* foundTargetFrame= */ true, timestampSearchResult.bytePositionToUpdate); /* foundTargetFrame= */ true, timestampSearchResult.bytePositionToUpdate);
skipInputUntilPosition(input, timestampSearchResult.bytePositionToUpdate);
return seekToPosition( return seekToPosition(
input, timestampSearchResult.bytePositionToUpdate, seekPositionHolder); input, timestampSearchResult.bytePositionToUpdate, seekPositionHolder);
case TimestampSearchResult.TYPE_NO_TIMESTAMP: case TimestampSearchResult.TYPE_NO_TIMESTAMP:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment