精简代码

This commit is contained in:
langhuihui
2022-02-19 22:36:03 +08:00
parent 24ed1b337c
commit fc65d14070
6 changed files with 97 additions and 29 deletions

View File

@@ -186,12 +186,7 @@ func (opt *Plugin) Publish(streamPath string, pub IPublisher) bool {
if !ok {
conf = EngineConfig
}
if ok = pub.receive(streamPath, pub, conf.GetPublishConfig()); ok {
p := pub.GetPublisher()
p.AudioTrack = p.Stream.NewAudioTrack()
p.VideoTrack = p.Stream.NewVideoTrack()
}
return ok
return pub.receive(streamPath, pub, conf.GetPublishConfig())
}
func (opt *Plugin) Subscribe(streamPath string, sub ISubscriber) bool {