Skip to content

Commit da3edda

Browse files
authored
Remove discard check when scanning file (#870)
1 parent 1a88391 commit da3edda

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/torchcodec/_core/SingleStreamDecoder.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,6 @@ void SingleStreamDecoder::scanFileAndUpdateMetadataAndIndex() {
243243
return;
244244
}
245245

246-
for (unsigned int i = 0; i < formatContext_->nb_streams; ++i) {
247-
// We want to scan and update the metadata of all streams.
248-
TORCH_CHECK(
249-
formatContext_->streams[i]->discard != AVDISCARD_ALL,
250-
"Did you add a stream before you called for a scan?");
251-
}
252-
253246
AutoAVPacket autoAVPacket;
254247
while (true) {
255248
ReferenceAVPacket packet(autoAVPacket);

0 commit comments

Comments
 (0)