diff --git a/torchvision/csrc/io/decoder/stream.cpp b/torchvision/csrc/io/decoder/stream.cpp index e924ea6a3d1..37dd5805d5a 100644 --- a/torchvision/csrc/io/decoder/stream.cpp +++ b/torchvision/csrc/io/decoder/stream.cpp @@ -232,7 +232,7 @@ void Stream::setFramePts(DecoderHeader* header, bool flush) { if (flush) { header->pts = nextPts_; // already in us } else { - header->pts = av_frame_get_best_effort_timestamp(frame_); + header->pts = frame_->best_effort_timestamp; if (header->pts == AV_NOPTS_VALUE) { header->pts = nextPts_; } else {