From a532779e335ebec91950db0f48de164754265c17 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Mon, 14 Oct 2024 14:47:51 +0200 Subject: [PATCH] simplify Path.HasStaticSource() (#3876) --- internal/conf/path.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/internal/conf/path.go b/internal/conf/path.go index 0ae1e0bc..54679939 100644 --- a/internal/conf/path.go +++ b/internal/conf/path.go @@ -578,17 +578,7 @@ func (pconf *Path) Equal(other *Path) bool { // HasStaticSource checks whether the path has a static source. func (pconf Path) HasStaticSource() bool { - return strings.HasPrefix(pconf.Source, "rtsp://") || - strings.HasPrefix(pconf.Source, "rtsps://") || - strings.HasPrefix(pconf.Source, "rtmp://") || - strings.HasPrefix(pconf.Source, "rtmps://") || - strings.HasPrefix(pconf.Source, "http://") || - strings.HasPrefix(pconf.Source, "https://") || - strings.HasPrefix(pconf.Source, "udp://") || - strings.HasPrefix(pconf.Source, "srt://") || - strings.HasPrefix(pconf.Source, "whep://") || - strings.HasPrefix(pconf.Source, "wheps://") || - pconf.Source == "rpiCamera" + return pconf.Source != "publisher" && pconf.Source != "redirect" } // HasOnDemandStaticSource checks whether the path has a on demand static source.