From bccc7bb9d76d97fcbe969433285dfb41cec1f42e Mon Sep 17 00:00:00 2001 From: enm10k Date: Thu, 1 Feb 2024 13:27:43 +0900 Subject: [PATCH] =?UTF-8?q?webrtc::SimulcastEncoderAdapter=20=E3=82=92?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=81=AE?= =?UTF-8?q?=E3=83=AD=E3=82=B8=E3=83=83=E3=82=AF=E3=82=92=E6=95=B4=E7=90=86?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sora_video_encoder_factory.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/sora_video_encoder_factory.cpp b/src/sora_video_encoder_factory.cpp index 064c4f32..1400b3f9 100644 --- a/src/sora_video_encoder_factory.cpp +++ b/src/sora_video_encoder_factory.cpp @@ -125,16 +125,15 @@ SoraVideoEncoderFactory::CreateVideoEncoder( const webrtc::SdpVideoFormat& format) { if (internal_encoder_factory_ != nullptr) { // サイマルキャストの場合はアダプタを噛ましつつ、無条件ですべてアライメントする - auto encoder = std::make_shared( - internal_encoder_factory_.get(), format); + std::shared_ptr encoder = + std::make_shared( + internal_encoder_factory_.get(), format); - if (!config_.force_simulcast_i420_conversion) { - return absl::make_unique(encoder, 16, 16); + if (config_.force_simulcast_i420_conversion) { + encoder = std::make_shared(encoder); } - auto adapted1 = std::make_shared(encoder); - auto adapted2 = absl::make_unique(adapted1, 16, 16); - return adapted2; + return absl::make_unique(encoder, 16, 16); } int alignment = 0;