Skip to content

Commit 06cd220

Browse files
committed
Fix compile issue
1 parent a4a034a commit 06cd220

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/torchcodec/_core/SingleStreamDecoder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ void SingleStreamDecoder::initializeDecoder() {
148148
}
149149

150150
if (formatContext_->duration > 0) {
151+
AVRational defaultTimeBase{1, AV_TIME_BASE};
151152
containerMetadata_.durationSeconds =
152-
ptsToSeconds(formatContext_->duration, AV_TIME_BASE_Q);
153+
ptsToSeconds(formatContext_->duration, defaultTimeBase);
153154
}
154155

155156
if (formatContext_->bit_rate > 0) {

0 commit comments

Comments
 (0)