Browse Source

规范性小改动

pull/121/head
mask-pp 5 years ago
parent
commit
2de43144ce
  1. 5
      protocol/rtmp/rtmprelay/rtmprelay.go

5
protocol/rtmp/rtmprelay/rtmprelay.go

@ -3,6 +3,7 @@ package rtmprelay @@ -3,6 +3,7 @@ package rtmprelay
import (
"bytes"
"fmt"
"github.com/gwuhaolin/livego/av"
"io"
"github.com/gwuhaolin/livego/protocol/amf"
@ -92,14 +93,14 @@ func (self *RtmpRelay) Start() error { @@ -92,14 +93,14 @@ func (self *RtmpRelay) Start() error {
self.connectPublishClient = core.NewConnClient()
log.Debugf("play server addr:%v starting....", self.PlayUrl)
err := self.connectPlayClient.Start(self.PlayUrl, "play")
err := self.connectPlayClient.Start(self.PlayUrl, av.PLAY)
if err != nil {
log.Debugf("connectPlayClient.Start url=%v error", self.PlayUrl)
return err
}
log.Debugf("publish server addr:%v starting....", self.PublishUrl)
err = self.connectPublishClient.Start(self.PublishUrl, "publish")
err = self.connectPublishClient.Start(self.PublishUrl, av.PUBLISH)
if err != nil {
log.Debugf("connectPublishClient.Start url=%v error", self.PublishUrl)
self.connectPlayClient.Close(nil)

Loading…
Cancel
Save