aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-10-05 09:38:13 +0200
committerdec05eba <dec05eba@protonmail.com>2022-10-05 09:38:13 +0200
commitcc811b04e3010b0a6defeebe4e2f756cdb79b477 (patch)
treee633bad48a7936f2204c7eb15b4039eea8639fba /src
parent65fce18c0954ee0329688c32c94d85cd584e98f9 (diff)
Custom url: support rtmps and srt
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0c7438e..3a74f29 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -941,7 +941,13 @@ static gboolean on_start_streaming_button_click(GtkButton *button, gpointer user
stream_url += stream_id_str;
} else if(strcmp(stream_service, "custom") == 0) {
stream_url = stream_id_str;
- if(stream_url.size() < 7 || strncmp(stream_url.c_str(), "rtmp://", 7) != 0)
+ if(stream_url.size() >= 7 && strncmp(stream_url.c_str(), "rtmp://", 7) == 0)
+ {}
+ else if(stream_url.size() >= 8 && strncmp(stream_url.c_str(), "rtmps://", 8) == 0)
+ {}
+ else if(stream_url.size() >= 6 && strncmp(stream_url.c_str(), "srt://", 6) == 0)
+ {}
+ else
stream_url = "rtmp://" + stream_url;
}