mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-22 17:47:11 +00:00
Set IsRunning earlier
This commit is contained in:
parent
5b52f47357
commit
0daf3d3170
1 changed files with 1 additions and 1 deletions
|
|
@ -172,6 +172,7 @@ func (v *VpxEncoder) startLooping() {
|
|||
// Release release memory and stop loop
|
||||
func (v *VpxEncoder) Release() {
|
||||
if v.IsRunning {
|
||||
v.IsRunning = false
|
||||
log.Println("Releasing encoder")
|
||||
log.Println("Close output", v.Output)
|
||||
C.vpx_img_free(&v.vpxImage)
|
||||
|
|
@ -182,6 +183,5 @@ func (v *VpxEncoder) Release() {
|
|||
close(v.Input)
|
||||
}
|
||||
}
|
||||
v.IsRunning = false
|
||||
// TODO: Can we merge IsRunning and Done together
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue