From fcf88315abf623b9ffa2f61bd4a31507ee2006ef Mon Sep 17 00:00:00 2001 From: gaelle Date: Fri, 11 Apr 2025 09:48:00 +0200 Subject: [PATCH] fix call activate video when create call --- Linphone/core/call/CallCore.cpp | 2 +- Linphone/model/tool/ToolModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 3e7187be6..17d47eb9b 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -109,7 +109,7 @@ CallCore::CallCore(const std::shared_ptr &call) : QObject(nullpt mIsStarted = mDuration > 0; mMicrophoneMuted = call->getMicrophoneMuted(); mSpeakerMuted = call->getSpeakerMuted(); - auto videoDirection = call->getCurrentParams()->getVideoDirection(); + auto videoDirection = call->getParams()->getVideoDirection(); mLocalVideoEnabled = videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv; auto remoteParams = call->getRemoteParams(); diff --git a/Linphone/model/tool/ToolModel.cpp b/Linphone/model/tool/ToolModel.cpp index e83a6ce92..0d830590b 100644 --- a/Linphone/model/tool/ToolModel.cpp +++ b/Linphone/model/tool/ToolModel.cpp @@ -182,7 +182,7 @@ bool ToolModel::createCall(const QString &sipAddress, SettingsModel::getInstance()->setCallToneIndicationsEnabled(true); } std::shared_ptr params = core->createCallParams(nullptr); - if (localVideoEnabled) CallModel::activateLocalVideo(params, localVideoEnabled); + CallModel::activateLocalVideo(params, localVideoEnabled); bool micEnabled = options.contains("microEnabled") ? options["microEnabled"].toBool() : true; params->enableMic(micEnabled);