From 3c5b1fd07fe040f3137280069441dca39ec23fed Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 26 Feb 2015 10:22:21 -0500 Subject: [PATCH] fix extra slash when adding trackurl to controlurl --- src/zm_rtsp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/zm_rtsp.cpp b/src/zm_rtsp.cpp index 61d24c0f8..bacd39b8f 100644 --- a/src/zm_rtsp.cpp +++ b/src/zm_rtsp.cpp @@ -440,7 +440,11 @@ int RtspThread::run() } else { - trackUrl += "/" + controlUrl; + if ( *trackUrl.rbegin() != '/') { + trackUrl += "/" + controlUrl; + } else { + trackUrl += controlUrl; + } } rtpClock = mediaDesc->getClock(); codecId = mFormatContext->streams[i]->codec->codec_id;