Support AAC tracks with custom sizelength, indexlength and indexdeltalength (#118)

* aac decode by sdp sizelength and indexlength

* fix linting

* fix linting

* 64-95 lines are duplicate of `track_aac_test.go:130-161` (dupl)

* fix linting

* fix linting

* decode aac use IndexDeltaLength
This commit is contained in:
Shi Ben
2022-04-15 18:35:54 +08:00
committed by GitHub
parent d479e9ee7d
commit bed854ece6
8 changed files with 302 additions and 80 deletions

View File

@@ -62,11 +62,14 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
},
},
&TrackAAC{
payloadType: 96,
typ: 2,
sampleRate: 48000,
channelCount: 2,
mpegConf: []byte{0x11, 0x90},
payloadType: 96,
typ: 2,
sampleRate: 48000,
channelCount: 2,
mpegConf: []byte{0x11, 0x90},
sizeLength: 13,
indexLength: 3,
indexDeltaLength: 3,
},
},
{
@@ -89,11 +92,14 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
},
},
&TrackAAC{
payloadType: 96,
typ: 2,
sampleRate: 48000,
channelCount: 2,
mpegConf: []byte{0x11, 0x90},
payloadType: 96,
typ: 2,
sampleRate: 48000,
channelCount: 2,
mpegConf: []byte{0x11, 0x90},
sizeLength: 13,
indexLength: 3,
indexDeltaLength: 3,
},
},
{
@@ -116,11 +122,14 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
},
},
&TrackAAC{
payloadType: 96,
typ: 2,
sampleRate: 48000,
channelCount: 2,
mpegConf: []byte{0x11, 0x90},
payloadType: 96,
typ: 2,
sampleRate: 48000,
channelCount: 2,
mpegConf: []byte{0x11, 0x90},
indexLength: 3,
sizeLength: 13,
indexDeltaLength: 3,
},
},
{