File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/torchcodec/decoders/_core Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -912,7 +912,7 @@ VideoDecoder::AudioFramesOutput VideoDecoder::getFramesPlayedInRangeAudio(
912912 // If we need to seek backwards, then we have to seek back to the beginning
913913 // of the stream.
914914 // See [Audio Decoding Design].
915- setCursorPtsInSecondsInternal (INT64_MIN);
915+ setCursor (INT64_MIN);
916916 }
917917
918918 // TODO-AUDIO Pre-allocate a long-enough tensor instead of creating a vec +
@@ -971,13 +971,13 @@ void VideoDecoder::setCursorPtsInSeconds(double seconds) {
971971 // We don't allow public audio decoding APIs to seek, see [Audio Decoding
972972 // Design]
973973 validateActiveStream (AVMEDIA_TYPE_VIDEO);
974- setCursorPtsInSecondsInternal (seconds);
974+ setCursor (
975+ secondsToClosestPts (seconds, streamInfos_[activeStreamIndex_].timeBase ));
975976}
976977
977- void VideoDecoder::setCursorPtsInSecondsInternal ( double seconds ) {
978+ void VideoDecoder::setCursor ( int64_t pts ) {
978979 cursorWasJustSet_ = true ;
979- cursor_ =
980- secondsToClosestPts (seconds, streamInfos_[activeStreamIndex_].timeBase );
980+ cursor_ = pts;
981981}
982982
983983/*
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ class VideoDecoder {
367367 // DECODING APIS AND RELATED UTILS
368368 // --------------------------------------------------------------------------
369369
370- void setCursorPtsInSecondsInternal ( double seconds );
370+ void setCursor ( int64_t pts );
371371 bool canWeAvoidSeeking () const ;
372372
373373 void maybeSeekToBeforeDesiredPts ();
You can’t perform that action at this time.
0 commit comments