mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 10:35:44 +00:00
Reinit encoders with the mutexes
This commit is contained in:
parent
0232384fe2
commit
8f859cd600
1 changed files with 2 additions and 2 deletions
|
|
@ -168,7 +168,7 @@ func (wmp *WebrtcMediaPipe) initAudio(srcHz int, frameSize int) error {
|
|||
return fmt.Errorf("opus fail: %w", err)
|
||||
}
|
||||
wmp.log.Debug().Msgf("Opus: %v", au.GetInfo())
|
||||
wmp.a = au
|
||||
wmp.SetAudio(au)
|
||||
buf := newBuffer(frame(srcHz, frameSize))
|
||||
dstHz, _ := au.SampleRate()
|
||||
if srcHz != dstHz {
|
||||
|
|
@ -198,7 +198,7 @@ func (wmp *WebrtcMediaPipe) initVideo(w, h int, scale float64, conf config.Video
|
|||
if enc == nil {
|
||||
return fmt.Errorf("broken video encoder init")
|
||||
}
|
||||
wmp.v = enc
|
||||
wmp.SetVideo(enc)
|
||||
wmp.log.Debug().Msgf("media scale: %vx%v -> %vx%v", w, h, sw, sh)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue