From cc811b04e3010b0a6defeebe4e2f756cdb79b477 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 5 Oct 2022 09:38:13 +0200 Subject: Custom url: support rtmps and srt --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') 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; } -- cgit v1.2.3