Skip to content

Commit 7d5972e

Browse files
committed
Comment
1 parent 98a6758 commit 7d5972e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/torchcodec/decoders/_core/VideoDecoder.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ class VideoDecoder {
299299
private:
300300
struct FrameInfo {
301301
int64_t pts = 0;
302+
// The value of this default is important: the last frame's nextPts will be
303+
// INT64_MAX, which ensures that the allFrames vec contains FrameInfo
304+
// structs with *increasing* nextPts values. That's a necessary condition
305+
// for the binary searches on those values to work properly (as typically
306+
// done during pts -> index conversions.)
302307
int64_t nextPts = INT64_MAX;
303308
};
304309
struct FilterState {

0 commit comments

Comments
 (0)