From 8c2a7f73d7edf7fe43c9c7172051d930fd7d6205 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 2 Oct 2020 09:44:31 +0200 Subject: [PATCH] Don't hardcode SRT API value --- stream/srt/srt.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stream/srt/srt.go b/stream/srt/srt.go index 8b6e7e7..69345ba 100644 --- a/stream/srt/srt.go +++ b/stream/srt/srt.go @@ -1,14 +1,15 @@ package srt +// #include +import "C" import ( + "github.com/haivision/srtgo" "gitlab.crans.org/nounous/ghostream/auth" "gitlab.crans.org/nounous/ghostream/auth/bypass" "log" "net" "strconv" "strings" - - "github.com/haivision/srtgo" ) // Options holds web package configuration @@ -68,7 +69,7 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet break // FIXME: should not break here } - streamId, err := s.GetSockOptString(46) // SRTO_STREAMID + streamId, err := s.GetSockOptString(C.SRTO_STREAMID) if err != nil { log.Println("Error while fetching stream key:", err) s.Close()