fix broadcast bug.

This commit is contained in:
Miroslav Šedivý 2020-11-18 23:32:43 +01:00
parent fb6dabf4e0
commit 45f029a2a4

View File

@ -47,7 +47,9 @@ func New(desktop types.DesktopManager, config *config.Capture) *CaptureManagerCt
func (manager *CaptureManagerCtx) Start() { func (manager *CaptureManagerCtx) Start() {
if manager.BroadcastEnabled() { if manager.BroadcastEnabled() {
manager.createBroadcastPipeline() if err := manager.createBroadcastPipeline(); err != nil {
manager.logger.Panic().Err(err).Msg("unable to create broadcast pipeline")
}
} }
manager.desktop.OnBeforeScreenSizeChange(func() { manager.desktop.OnBeforeScreenSizeChange(func() {
@ -66,7 +68,9 @@ func (manager *CaptureManagerCtx) Start() {
} }
if manager.BroadcastEnabled() { if manager.BroadcastEnabled() {
manager.createBroadcastPipeline() if err := manager.createBroadcastPipeline(); err != nil {
manager.logger.Panic().Err(err).Msg("unable to create broadcast pipeline")
}
} }
}) })
@ -97,7 +101,7 @@ func (manager *CaptureManagerCtx) Shutdown() error {
} }
if manager.BroadcastEnabled() { if manager.BroadcastEnabled() {
manager.createBroadcastPipeline() manager.destroyBroadcastPipeline()
} }
manager.emit_stop <- true manager.emit_stop <- true