From e7b533f3809ba105fdba8a5d8e1cd0c48f559aa2 Mon Sep 17 00:00:00 2001 From: Anthony Casagrande Date: Tue, 26 Sep 2023 19:54:50 -0700 Subject: [PATCH] fix: StreamURI values not parsed in external rtsp mode (#295) Signed-off-by: Anthony Casagrande --- internal/driver/driver.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/driver/driver.go b/internal/driver/driver.go index 33751989..cc4e6c6b 100644 --- a/internal/driver/driver.go +++ b/internal/driver/driver.go @@ -115,10 +115,6 @@ func (d *Driver) Initialize(sdk interfaces.DeviceServiceSDK) error { d.lc.Errorf("failed to register secret update callback: %v", err) } - if d.rtspServerMode != RTSPServerModeInternal { - return nil // nothing left to do - } - rtspServerHostName, ok := d.ds.DriverConfigs()[RtspServerHostName] if !ok { rtspServerHostName = DefaultRtspServerHostName @@ -135,6 +131,10 @@ func (d *Driver) Initialize(sdk interfaces.DeviceServiceSDK) error { d.lc.Infof("RTSP TCP port: %s", rtspPort) d.rtspTcpPort = rtspPort + if d.rtspServerMode != RTSPServerModeInternal { + return nil // nothing left to do + } + // check to see if rtsp-simple-server file/binary exists rtspExecutable := d.ds.DriverConfigs()[RtspServerExe] if rtspExecutable == "" {