improve tests

This commit is contained in:
aler9
2022-08-14 20:54:57 +02:00
parent 40c1ff8dfe
commit a0a168d26c
11 changed files with 78 additions and 28 deletions

View File

@@ -9,6 +9,22 @@ import (
"github.com/aler9/gortsplib/pkg/mpeg4audio"
)
func TestTrackMPEG4AudioAttributes(t *testing.T) {
track := &TrackMPEG4Audio{
PayloadType: 96,
Config: &mpeg4audio.Config{
Type: 2,
SampleRate: 48000,
ChannelCount: 2,
},
SizeLength: 13,
IndexLength: 3,
IndexDeltaLength: 3,
}
require.Equal(t, 48000, track.ClockRate())
require.Equal(t, "", track.GetControl())
}
func TestTrackMPEG4AudioClone(t *testing.T) {
track := &TrackMPEG4Audio{
PayloadType: 96,