From 40b51294b94b0d2cc130bc5718d9ae5b8f2a6ab0 Mon Sep 17 00:00:00 2001 From: Sektor van Skijlen Date: Mon, 6 Dec 2021 10:51:47 +0100 Subject: [PATCH] [apps] Added support for adapter parameter in caller mode (#2202) --- apps/transmitmedia.cpp | 4 ++-- testing/testmedia.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/transmitmedia.cpp b/apps/transmitmedia.cpp index c61c703b8..da67bdaee 100644 --- a/apps/transmitmedia.cpp +++ b/apps/transmitmedia.cpp @@ -377,9 +377,9 @@ void SrtCommon::OpenClient(string host, int port) { PrepareClient(); - if ( m_outgoing_port ) + if (m_outgoing_port || m_adapter != "") { - SetupAdapter("", m_outgoing_port); + SetupAdapter(m_adapter, m_outgoing_port); } ConnectClient(host, port); diff --git a/testing/testmedia.cpp b/testing/testmedia.cpp index 932406888..a5006c48d 100755 --- a/testing/testmedia.cpp +++ b/testing/testmedia.cpp @@ -881,9 +881,9 @@ void SrtCommon::OpenClient(string host, int port) { PrepareClient(); - if (m_outgoing_port) + if (m_outgoing_port || m_adapter != "") { - SetupAdapter("", m_outgoing_port); + SetupAdapter(m_adapter, m_outgoing_port); } ConnectClient(host, port); @@ -2580,10 +2580,10 @@ void SrtModel::Establish(std::string& w_name) Verb() << "NO STREAM ID for SRT connection"; } - if (m_outgoing_port) + if (m_outgoing_port || m_adapter != "") { - Verb() << "Setting outgoing port: " << m_outgoing_port; - SetupAdapter("", m_outgoing_port); + Verb() << "Setting outgoing port: " << m_outgoing_port << " adapter:" << m_adapter; + SetupAdapter(m_adapter, m_outgoing_port); } ConnectClient(m_host, m_port);