mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-02 00:10:07 +02:00
streamsrc mutex.
This commit is contained in:
parent
527b1f08f8
commit
8e80ef2c69
1 changed files with 4 additions and 0 deletions
|
@ -39,6 +39,7 @@ func streamSrcNew(enabled bool, codecPipeline map[string]string, video_id string
|
|||
pushedData := map[string]prometheus.Summary{}
|
||||
pipelinesCounter := map[string]prometheus.Counter{}
|
||||
pipelinesActive := map[string]prometheus.Gauge{}
|
||||
|
||||
for codecName, pipeline := range codecPipeline {
|
||||
codec, ok := codec.ParseStr(codecName)
|
||||
if !ok {
|
||||
|
@ -103,6 +104,9 @@ func (manager *StreamSrcManagerCtx) shutdown() {
|
|||
}
|
||||
|
||||
func (manager *StreamSrcManagerCtx) Codec() codec.RTPCodec {
|
||||
manager.pipelineMu.Lock()
|
||||
defer manager.pipelineMu.Unlock()
|
||||
|
||||
return manager.codec
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue