From a95bf960e0a90485d3263da3f7ad50f38e58672d Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 8 May 2022 09:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84ipv6=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/MediaSource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/MediaSource.cpp b/src/Common/MediaSource.cpp index 8b29bc91..66b8e339 100644 --- a/src/Common/MediaSource.cpp +++ b/src/Common/MediaSource.cpp @@ -514,7 +514,7 @@ void MediaInfo::parse(const string &url_in){ } else { _host = _vhost = vhost; } - if (_vhost == "localhost" || INADDR_NONE != inet_addr(_vhost.data())) { + if (_vhost == "localhost" || isIP(_vhost.data())) { //如果访问的是localhost或ip,那么则为默认虚拟主机 _vhost = DEFAULT_VHOST; }