From d1839f141a19fb6e087c9779444ea1be8633c1d1 Mon Sep 17 00:00:00 2001 From: kimvde Date: Tue, 7 Jan 2020 11:03:42 +0000 Subject: [PATCH] Add comment explaining FlacBinarySearchSeeker output PiperOrigin-RevId: 288464154 --- .../android/exoplayer2/ext/flac/FlacBinarySearchSeeker.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacBinarySearchSeeker.java b/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacBinarySearchSeeker.java index cad5219883..34b3ad2df5 100644 --- a/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacBinarySearchSeeker.java +++ b/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacBinarySearchSeeker.java @@ -126,6 +126,8 @@ import java.nio.ByteBuffer; if (targetSampleInLastFrame) { // We are holding the target frame in outputFrameHolder. Set its presentation time now. outputFrameHolder.timeUs = decoderJni.getLastFrameTimestamp(); + // The input position is passed even though it does not indicate the frame containing the + // target sample because the extractor must continue to read from this position. return TimestampSearchResult.targetFoundResult(input.getPosition()); } else if (nextFrameSampleIndex <= targetSampleIndex) { return TimestampSearchResult.underestimatedResult(