Skip to content

Commit a3d520b

Browse files
committed
lint
1 parent 8858777 commit a3d520b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/torchcodec/_core/Encoder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,13 +754,12 @@ void VideoEncoder::initializeEncoder(
754754
TORCH_CHECK(
755755
avFormatContext_->oformat != nullptr,
756756
"Output format is null, unable to find default codec.");
757-
avCodec = avcodec_find_encoder(avFormatContext_->oformat->video_codec);
758-
// TODO: merge above logic w this logic
759757
// Try to find a hardware-accelerated encoder if not using CPU
758+
avCodec = avcodec_find_encoder(avFormatContext_->oformat->video_codec);
760759
if (videoStreamOptions.device.type() != torch::kCPU) {
761760
avCodec = deviceInterface_->findEncoder(avFormatContext_->oformat->video_codec).value_or(avCodec);
762-
TORCH_CHECK(avCodec != nullptr, "Video codec not found");
763761
}
762+
TORCH_CHECK(avCodec != nullptr, "Video codec not found");
764763

765764
}
766765

0 commit comments

Comments
 (0)