From 04991d5051b210c8498151552ed1fe793bea8152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 24 Feb 2022 14:10:59 -0300 Subject: [PATCH] VideoManager: Fix UDP url source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/VideoManager/VideoManager.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/VideoManager/VideoManager.cc b/src/VideoManager/VideoManager.cc index 71c49400e47..2b3ba92ddb9 100644 --- a/src/VideoManager/VideoManager.cc +++ b/src/VideoManager/VideoManager.cc @@ -639,7 +639,11 @@ VideoManager::_updateSettings(unsigned id) } break; case VIDEO_STREAM_TYPE_RTPUDP: - if ((settingsChanged |= _updateVideoUri(id, QStringLiteral("udp://0.0.0.0:%1").arg(pInfo->uri())))) { + if ((settingsChanged |= _updateVideoUri( + id, + pInfo->uri().contains("udp://") + ? pInfo->uri() // Specced case + : QStringLiteral("udp://0.0.0.0:%1").arg(pInfo->uri())))) { _toolbox->settingsManager()->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceUDPH264); } break; @@ -663,7 +667,11 @@ VideoManager::_updateSettings(unsigned id) settingsChanged |= _updateVideoUri(id, pTinfo->uri()); break; case VIDEO_STREAM_TYPE_RTPUDP: - settingsChanged |= _updateVideoUri(id, QStringLiteral("udp://0.0.0.0:%1").arg(pTinfo->uri())); + settingsChanged |= _updateVideoUri( + id, + pInfo->uri().contains("udp://") + ? pInfo->uri() // Specced case + : QStringLiteral("udp://0.0.0.0:%1").arg(pInfo->uri())); break; case VIDEO_STREAM_TYPE_MPEG_TS_H264: settingsChanged |= _updateVideoUri(id, QStringLiteral("mpegts://0.0.0.0:%1").arg(pTinfo->uri()));