fix support for LPCM tracks with no explicit channel count

(https://github.com/aler9/rtsp-simple-server/issues/1292)
This commit is contained in:
aler9
2022-12-12 18:13:00 +01:00
parent 2a5b3e3ee5
commit 107d7b618d
2 changed files with 34 additions and 6 deletions

View File

@@ -95,6 +95,28 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
ChannelCount: 2,
},
},
{
"lpcm 16 with no explicit channel",
&psdp.MediaDescription{
MediaName: psdp.MediaName{
Media: "audio",
Protos: []string{"RTP", "AVP"},
Formats: []string{"97"},
},
Attributes: []psdp.Attribute{
{
Key: "rtpmap",
Value: "97 L16/16000",
},
},
},
&TrackLPCM{
PayloadType: 97,
BitDepth: 16,
SampleRate: 16000,
ChannelCount: 1,
},
},
{
"lpcm 24",
&psdp.MediaDescription{