We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b943504 commit b045b6cCopy full SHA for b045b6c
src/torchcodec/_core/Encoder.cpp
@@ -708,6 +708,9 @@ void VideoEncoder::initializeEncoder(
708
codec,
709
" not found. To see available codecs, run: ffmpeg -encoders");
710
} else {
711
+ TORCH_CHECK(
712
+ avFormatContext_->oformat != nullptr,
713
+ "Output format is null, unable to find default codec.");
714
avCodec = avcodec_find_encoder(avFormatContext_->oformat->video_codec);
715
TORCH_CHECK(avCodec != nullptr, "Video codec not found");
716
}
0 commit comments