File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1490,10 +1490,7 @@ std::optional<int64_t> SingleStreamDecoder::getNumFrames(
14901490 case SeekMode::exact:
14911491 return streamMetadata.numFramesFromContent .value ();
14921492 case SeekMode::approximate: {
1493- TORCH_CHECK (
1494- streamMetadata.numFramesFromHeader .has_value (),
1495- " Cannot use approximate mode since we couldn't find the number of frames from the metadata." );
1496- return streamMetadata.numFramesFromHeader .value ();
1493+ return streamMetadata.numFramesFromHeader ;
14971494 }
14981495 default :
14991496 throw std::runtime_error (" Unknown SeekMode" );
@@ -1518,10 +1515,7 @@ std::optional<double> SingleStreamDecoder::getMaxSeconds(
15181515 case SeekMode::exact:
15191516 return streamMetadata.endStreamPtsSecondsFromContent .value ();
15201517 case SeekMode::approximate: {
1521- TORCH_CHECK (
1522- streamMetadata.durationSecondsFromHeader .has_value (),
1523- " Cannot use approximate mode since we couldn't find the duration from the metadata." );
1524- return streamMetadata.durationSecondsFromHeader .value ();
1518+ return streamMetadata.durationSecondsFromHeader ;
15251519 }
15261520 default :
15271521 throw std::runtime_error (" Unknown SeekMode" );
You can’t perform that action at this time.
0 commit comments