File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments