diff --git a/stream/srt/srt.go b/stream/srt/srt.go index 354a92d..ad85035 100644 --- a/stream/srt/srt.go +++ b/stream/srt/srt.go @@ -71,20 +71,20 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet break // FIXME: should not break here } - streamId, err := s.GetSockOptString(C.SRTO_STREAMID) + streamID, err := s.GetSockOptString(C.SRTO_STREAMID) if err != nil { log.Println("Error while fetching stream key:", err) s.Close() continue } - if !strings.Contains(streamId, "|") { - log.Printf("Warning: stream id must be at the format streamId|password. Input: %s", streamId) + if !strings.Contains(streamID, "|") { + log.Printf("Warning: stream id must be at the format streamID|password. Input: %s", streamID) s.Close() continue } - splittedStreamId := strings.SplitN(streamId, "|", 2) - streamName, password := splittedStreamId[0], splittedStreamId[1] + splittedStreamID := strings.SplitN(streamID, "|", 2) + streamName, password := splittedStreamID[0], splittedStreamID[1] loggedIn, err := authBackend.Login(streamName, password) if !loggedIn { log.Printf("Invalid credentials for stream %s.", streamName) diff --git a/stream/srt/srt_test.go b/stream/srt/srt_test.go index e174a27..885a347 100644 --- a/stream/srt/srt_test.go +++ b/stream/srt/srt_test.go @@ -40,7 +40,7 @@ func TestServeSRT(t *testing.T) { ffmpeg := exec.Command("ffmpeg", "-i", "http://ftp.crans.org/events/Blender%20OpenMovies/big_buck_bunny_480p_stereo.ogg", - "-f", "flv", "srt://127.0.0.1:9711??streamid=demo|") + "-f", "flv", "srt://127.0.0.1:9711?streamid=demo|") output, err := ffmpeg.StdoutPipe() errOutput, err := ffmpeg.StderrPipe()