mirror of
https://github.com/aler9/gortsplib
synced 2025-11-02 23:04:05 +08:00
add MP4A-LATM decoder and encoder (#299)
This commit is contained in:
@@ -49,7 +49,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
|
||||
@@ -68,6 +68,7 @@ func (e *Encoder) Init() {
|
||||
|
||||
e.sequenceNumber = *e.InitialSequenceNumber
|
||||
e.timeEncoder = rtptime.NewEncoder(rtpClockRate, *e.InitialTimestamp)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Encode encodes a VP8 frame into RTP/VP8 packets.
|
||||
|
||||
Reference in New Issue
Block a user