mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 14:52:46 +08:00
support multichannel Opus (https://github.com/bluenviron/mediamtx/issues/3355) (#572)
This commit is contained in:
@@ -645,14 +645,37 @@ var casesFormat = []struct {
|
||||
"sprop-stereo": "1",
|
||||
},
|
||||
&Opus{
|
||||
PayloadTyp: 96,
|
||||
IsStereo: true,
|
||||
PayloadTyp: 96,
|
||||
IsStereo: true,
|
||||
ChannelCount: 2,
|
||||
},
|
||||
"opus/48000/2",
|
||||
map[string]string{
|
||||
"sprop-stereo": "1",
|
||||
},
|
||||
},
|
||||
{
|
||||
"audio opus 5.1",
|
||||
"audio",
|
||||
96,
|
||||
"multiopus/48000/6",
|
||||
map[string]string{
|
||||
"num_streams": "4",
|
||||
"coupled_streams": "2",
|
||||
"channel_mapping": "0,4,1,2,3,5",
|
||||
},
|
||||
&Opus{
|
||||
PayloadTyp: 96,
|
||||
ChannelCount: 6,
|
||||
},
|
||||
"multiopus/48000/6",
|
||||
map[string]string{
|
||||
"channel_mapping": "0,4,1,2,3,5",
|
||||
"coupled_streams": "2",
|
||||
"num_streams": "4",
|
||||
"sprop-maxcapturerate": "48000",
|
||||
},
|
||||
},
|
||||
{
|
||||
"audio ac3",
|
||||
"audio",
|
||||
@@ -1250,6 +1273,14 @@ func FuzzUnmarshalOpus(f *testing.F) {
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzUnmarshalOpusMulti(f *testing.F) {
|
||||
f.Add("48000/a")
|
||||
|
||||
f.Fuzz(func(_ *testing.T, a string) {
|
||||
Unmarshal("audio", 96, "multiopus/"+a, nil) //nolint:errcheck
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzUnmarshalVorbis(f *testing.F) {
|
||||
f.Fuzz(func(_ *testing.T, a, b string) {
|
||||
Unmarshal("audio", 96, "Vorbis/"+a, map[string]string{ //nolint:errcheck
|
||||
|
Reference in New Issue
Block a user