change signature of rtp encoders and decoders

This commit is contained in:
aler9
2022-03-20 11:30:04 +01:00
parent ba99421e74
commit e7aca99c73
13 changed files with 175 additions and 110 deletions

View File

@@ -52,7 +52,10 @@ func main() {
}
// setup decoder
dec := rtpaac.NewDecoder(clockRate)
dec := &rtpaac.Decoder{
SampleRate: clockRate,
}
dec.Init()
// called when a RTP packet arrives
c.OnPacketRTP = func(trackID int, pkt *rtp.Packet) {