Skip to content

Commit 72689a8

Browse files
committed
sanitize SRT streamid before using it as stream name - some encoders send ##!! in there
1 parent d1cb436 commit 72689a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/input/input_tssrt.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ namespace Mist{
142142
std::string streamid = srtConn->getStreamName();
143143
int64_t acc = config->getInteger("acceptable");
144144
if (acc == 0){
145-
if (streamid.size()){streamName += "+" + streamid;}
145+
if (streamid.size()){
146+
Util::sanitizeName(streamid);
147+
streamName += "+" + streamid;
148+
}
146149
}else if(acc == 2){
147150
if (streamName != streamid){
148151
FAIL_MSG("Stream ID '%s' does not match stream name, push blocked", streamid.c_str());

0 commit comments

Comments
 (0)