mirror of
https://github.com/aler9/gortsplib
synced 2025-11-03 11:11:01 +08:00
add MP4A-LATM decoder and encoder (#299)
This commit is contained in:
@@ -52,7 +52,7 @@ type Encoder struct {
|
||||
}
|
||||
|
||||
// Init initializes the encoder.
|
||||
func (e *Encoder) Init() {
|
||||
func (e *Encoder) Init() error {
|
||||
if e.SSRC == nil {
|
||||
v := randUint32()
|
||||
e.SSRC = &v
|
||||
@@ -71,6 +71,7 @@ func (e *Encoder) Init() {
|
||||
|
||||
e.sequenceNumber = *e.InitialSequenceNumber
|
||||
e.timeEncoder = rtptime.NewEncoder(90000, *e.InitialTimestamp)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Encode encodes frames into RTP packets.
|
||||
|
||||
Reference in New Issue
Block a user