From 4434bb1a2503bdc38bc400b6406b18737b0ab9f3 Mon Sep 17 00:00:00 2001 From: liuxiaoliang <37902979+liuxiaoliang8@users.noreply.github.com> Date: Thu, 6 Jan 2022 12:02:31 +0800 Subject: [PATCH] SRT: use const string to sprint rtmp url. (#2847) --- trunk/src/srt/srt_to_rtmp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/srt/srt_to_rtmp.cpp b/trunk/src/srt/srt_to_rtmp.cpp index 53ae3b01a..268a1cbf4 100644 --- a/trunk/src/srt/srt_to_rtmp.cpp +++ b/trunk/src/srt/srt_to_rtmp.cpp @@ -268,10 +268,10 @@ rtmp_client::rtmp_client(std::string key_path):_key_path(key_path) break; } } - port = (port == 0) ? 1935 : port; + port = (port == 0) ? SRS_CONSTS_RTMP_DEFAULT_PORT : port; std::stringstream ss; - ss << "rtmp://127.0.0.1"; + ss << "rtmp://" << SRS_CONSTS_LOCALHOST; ss << ":" << port; ss << "/" << _appname; if (_vhost != DEF_VHOST) {