Skip to content

Commit

Permalink
Fix stream consumer stuck after closing bitrate worker (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnjooiopa authored Jun 11, 2024
1 parent 00e531e commit d18295b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/isapi/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package isapi
import "github.com/AlexxIT/go2rtc/pkg/custom"

func (c *Client) startBitrateWorker() {
c.stopBitrateWorker = make(chan struct{})
c.stopBitrateWorker = make(chan struct{}, 1)
go custom.StartBitrateWorker(&c.send, &c.bitrate, c.stopBitrateWorker)
}
2 changes: 1 addition & 1 deletion pkg/mp4/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package mp4
import "github.com/AlexxIT/go2rtc/pkg/custom"

func (c *Consumer) startBitrateWorker() {
c.stopBitrateWorker = make(chan struct{})
c.stopBitrateWorker = make(chan struct{}, 1)
go custom.StartBitrateWorker(&c.SuperConsumer.Send, &c.SuperConsumer.Bitrate, c.stopBitrateWorker)
}
2 changes: 1 addition & 1 deletion pkg/webrtc/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import (
)

func (c *Conn) startBitrateWorker() {
c.stopBitrateWorker = make(chan struct{})
c.stopBitrateWorker = make(chan struct{}, 1)
go custom.StartBitrateWorker(&c.send, &c.bitrate, c.stopBitrateWorker)
}

0 comments on commit d18295b

Please sign in to comment.