Skip to content

Commit

Permalink
VideoManager: Fix UDP url source
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
  • Loading branch information
patrickelectric committed Feb 24, 2022
1 parent cfcd1c5 commit 04991d5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/VideoManager/VideoManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()));
Expand Down

0 comments on commit 04991d5

Please sign in to comment.