Skip to content

Commit db9ff94

Browse files
committed
Add one more check
1 parent 44500ad commit db9ff94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,6 +1709,8 @@ void VideoDecoder::createSwrContext(
17091709
nullptr);
17101710
#endif
17111711

1712+
TORCH_CHECK(swrContext != nullptr, "Couldn't create swrContext");
1713+
17121714
status = swr_init(swrContext);
17131715
TORCH_CHECK(
17141716
status == AVSUCCESS,

0 commit comments

Comments
 (0)