DefaultOggSeeker: use skipFully() instead skip().

skip() may skip less than what we want here.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124930478
This commit is contained in:
eguven 2016-06-15 02:22:30 -07:00 committed by Oliver Woodman
parent c45a3959b6
commit e6267cd253

View file

@ -174,7 +174,7 @@ import java.io.IOException;
start = input.getPosition() + pageSize; start = input.getPosition() + pageSize;
startGranule = pageHeader.granulePosition; startGranule = pageHeader.granulePosition;
if (end - start + pageSize < MATCH_BYTE_RANGE) { if (end - start + pageSize < MATCH_BYTE_RANGE) {
input.skip(pageSize); input.skipFully(pageSize);
return -(startGranule + 2); return -(startGranule + 2);
} }
} }
@ -194,7 +194,7 @@ import java.io.IOException;
} }
// position accepted (before target granule and within MATCH_RANGE) // position accepted (before target granule and within MATCH_RANGE)
input.skip(pageSize); input.skipFully(pageSize);
return -(pageHeader.granulePosition + 2); return -(pageHeader.granulePosition + 2);
} }