diff --git a/go.mod b/go.mod index 95f73a1a..1f24f03b 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5 - github.com/aler9/gortsplib v0.0.0-20220410133005-d479e9ee7dc8 + github.com/aler9/gortsplib v0.0.0-20220415110824-9070fde20525 github.com/asticode/go-astits v1.10.0 github.com/fsnotify/fsnotify v1.4.9 github.com/gin-gonic/gin v1.7.2 diff --git a/go.sum b/go.sum index eafbb844..7be840fb 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/aler9/gortsplib v0.0.0-20220410133005-d479e9ee7dc8 h1:S/gIlt6NaWkRC5iFyH6zYdsT4V24LMvo27T7qiVvZu4= -github.com/aler9/gortsplib v0.0.0-20220410133005-d479e9ee7dc8/go.mod h1:Mezkz7Jb5zrIWP6MxJ2uBgt5xwywZkcdmuQZ2QrFYsM= +github.com/aler9/gortsplib v0.0.0-20220415110824-9070fde20525 h1:terPTGeZkg+etazcPrC4edVxurH5IE5Bl9kTavwaLeQ= +github.com/aler9/gortsplib v0.0.0-20220415110824-9070fde20525/go.mod h1:Mezkz7Jb5zrIWP6MxJ2uBgt5xwywZkcdmuQZ2QrFYsM= github.com/aler9/rtmp v0.0.0-20210403095203-3be4a5535927 h1:95mXJ5fUCYpBRdSOnLAQAdJHHKxxxJrVCiaqDi965YQ= github.com/aler9/rtmp v0.0.0-20210403095203-3be4a5535927/go.mod h1:vzuE21rowz+lT1NGsWbreIvYulgBpCGnQyeTyFblUHc= github.com/asticode/go-astikit v0.20.0 h1:+7N+J4E4lWx2QOkRdOf6DafWJMv6O4RRfgClwQokrH8= diff --git a/internal/hls/client_audio_processor.go b/internal/hls/client_audio_processor.go index f18c4d53..c52bcadb 100644 --- a/internal/hls/client_audio_processor.go +++ b/internal/hls/client_audio_processor.go @@ -81,7 +81,7 @@ func (p *clientAudioProcessor) doProcess( if !p.trackInitialized { p.trackInitialized = true - track, err := gortsplib.NewTrackAAC(97, pkt.Type, pkt.SampleRate, pkt.ChannelCount, nil) + track, err := gortsplib.NewTrackAAC(97, pkt.Type, pkt.SampleRate, pkt.ChannelCount, nil, 13, 3, 3) if err != nil { return err } diff --git a/internal/hls/muxer_test.go b/internal/hls/muxer_test.go index 73534553..e93bf3da 100644 --- a/internal/hls/muxer_test.go +++ b/internal/hls/muxer_test.go @@ -17,7 +17,7 @@ func TestMuxerVideoAudio(t *testing.T) { videoTrack, err := gortsplib.NewTrackH264(96, []byte{0x07, 0x01, 0x02, 0x03}, []byte{0x08}, nil) require.NoError(t, err) - audioTrack, err := gortsplib.NewTrackAAC(97, 2, 44100, 2, nil) + audioTrack, err := gortsplib.NewTrackAAC(97, 2, 44100, 2, nil, 13, 3, 3) require.NoError(t, err) m, err := NewMuxer(3, 1*time.Second, 50*1024*1024, videoTrack, audioTrack) @@ -252,7 +252,7 @@ func TestMuxerVideoOnly(t *testing.T) { } func TestMuxerAudioOnly(t *testing.T) { - audioTrack, err := gortsplib.NewTrackAAC(97, 2, 44100, 2, nil) + audioTrack, err := gortsplib.NewTrackAAC(97, 2, 44100, 2, nil, 13, 3, 3) require.NoError(t, err) m, err := NewMuxer(3, 1*time.Second, 50*1024*1024, nil, audioTrack) diff --git a/internal/rtmp/conn.go b/internal/rtmp/conn.go index da4ce02a..681b175d 100644 --- a/internal/rtmp/conn.go +++ b/internal/rtmp/conn.go @@ -209,7 +209,7 @@ func (c *Conn) readTracksFromMetadata(pkt av.Packet) (*gortsplib.TrackH264, *gor } audioTrack, err = gortsplib.NewTrackAAC(96, int(mpegConf.Type), mpegConf.SampleRate, - mpegConf.ChannelCount, mpegConf.AOTSpecificConfig) + mpegConf.ChannelCount, mpegConf.AOTSpecificConfig, 13, 3, 3) if err != nil { return nil, nil, err } diff --git a/internal/rtmp/conn_test.go b/internal/rtmp/conn_test.go index 3aad7bd3..30c6f545 100644 --- a/internal/rtmp/conn_test.go +++ b/internal/rtmp/conn_test.go @@ -277,7 +277,7 @@ func TestReadTracks(t *testing.T) { require.NoError(t, err) require.Equal(t, videoTrack2, videoTrack) - audioTrack2, err := gortsplib.NewTrackAAC(96, 2, 44100, 2, nil) + audioTrack2, err := gortsplib.NewTrackAAC(96, 2, 44100, 2, nil, 13, 3, 3) require.NoError(t, err) require.Equal(t, audioTrack2, audioTrack) @@ -690,7 +690,7 @@ func TestWriteTracks(t *testing.T) { nil) require.NoError(t, err) - audioTrack, err := gortsplib.NewTrackAAC(96, 2, 44100, 2, nil) + audioTrack, err := gortsplib.NewTrackAAC(96, 2, 44100, 2, nil, 13, 3, 3) require.NoError(t, err) err = rconn.WriteTracks(videoTrack, audioTrack)