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
This commit is contained in:
kimvde 2020-02-03 16:24:05 +00:00 committed by kim-vde
parent 792d9b39e0
commit a6f22cd96c

View file

@ -203,9 +203,9 @@ public abstract class BinarySearchSeeker {
timestampSearchResult.timestampToUpdate, timestampSearchResult.bytePositionToUpdate);
break;
case TimestampSearchResult.TYPE_TARGET_TIMESTAMP_FOUND:
skipInputUntilPosition(input, timestampSearchResult.bytePositionToUpdate);
markSeekOperationFinished(
/* foundTargetFrame= */ true, timestampSearchResult.bytePositionToUpdate);
skipInputUntilPosition(input, timestampSearchResult.bytePositionToUpdate);
return seekToPosition(
input, timestampSearchResult.bytePositionToUpdate, seekPositionHolder);
case TimestampSearchResult.TYPE_NO_TIMESTAMP: