Replacing hand rolled ion-sfu atomic with uber/atomic (#465)

* Replacing hand rolled ion-sfu atomic with uber/atomic

* Remove another hand rolled atomic
This commit is contained in:
Raja Subramanian
2022-02-25 11:57:09 +05:30
committed by GitHub
parent 2959eebca8
commit 5a4181b581
11 changed files with 90 additions and 150 deletions
-15
View File
@@ -3,7 +3,6 @@ package buffer
import (
"encoding/binary"
"errors"
"sync/atomic"
"github.com/livekit/protocol/logger"
)
@@ -14,20 +13,6 @@ var (
errInvalidPacket = errors.New("invalid packet")
)
type atomicBool int32
func (a *atomicBool) set(value bool) {
var i int32
if value {
i = 1
}
atomic.StoreInt32((*int32)(a), i)
}
func (a *atomicBool) get() bool {
return atomic.LoadInt32((*int32)(a)) != 0
}
// VP8 is a helper to get temporal data from VP8 packet header
/*
VP8 Payload Descriptor