From f75ea2822126e32d7a3a6b47966fa5bb7e9744d3 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 10 May 2017 20:21:42 +0200 Subject: [PATCH] Only strip off and parse the last "?" from outgoing RTMP URLs, leaving any previous occurrences intact. --- src/output/output_rtmp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/output/output_rtmp.cpp b/src/output/output_rtmp.cpp index 6358918e..13e5873c 100644 --- a/src/output/output_rtmp.cpp +++ b/src/output/output_rtmp.cpp @@ -40,12 +40,12 @@ namespace Mist { streamOut = streamName; } } - if (streamName.find('?') != std::string::npos){ - streamName = streamName.substr(0, streamName.find('?')); + if (streamName.rfind('?') != std::string::npos){ + streamName = streamName.substr(0, streamName.rfind('?')); } - if (streamOut.find('?') != std::string::npos){ - std::string tmpVars = streamOut.substr(streamOut.find('?') + 1); - streamOut = streamOut.substr(0, streamOut.find('?')); + if (streamOut.rfind('?') != std::string::npos){ + std::string tmpVars = streamOut.substr(streamOut.rfind('?') + 1); + streamOut = streamOut.substr(0, streamOut.rfind('?')); parseVars(tmpVars); } initialize();