Skip to content

Commit 5ab33b9

Browse files
committed
Comment
1 parent c03294b commit 5ab33b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,8 @@ VideoDecoder::BatchDecodedOutput VideoDecoder::getFramesDisplayedByTimestamps(
11191119

11201120
auto it = std::lower_bound(
11211121
stream.allFrames.begin(),
1122+
// See https://github.com/pytorch/torchcodec/pull/286 for why the `- 1`
1123+
// is needed.
11221124
stream.allFrames.end() - 1,
11231125
framePts,
11241126
[&stream](const FrameInfo& info, double framePts) {

0 commit comments

Comments
 (0)