Change codec channels from uint16 to uint8

This commit is contained in:
Alex X
2025-03-25 15:31:43 +03:00
parent f535595d1f
commit e1342f06b7
8 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ import (
type Codec struct {
Name string // H264, PCMU, PCMA, opus...
ClockRate uint32 // 90000, 8000, 16000...
Channels uint16 // 0, 1, 2
Channels uint8 // 0, 1, 2
FmtpLine string
PayloadType uint8
}
+1 -1
View File
@@ -139,7 +139,7 @@ func MarshalSDP(name string, medias []*Media) ([]byte, error) {
Protos: []string{"RTP", "AVP"},
},
}
md.WithCodec(codec.PayloadType, name, codec.ClockRate, codec.Channels, codec.FmtpLine)
md.WithCodec(codec.PayloadType, name, codec.ClockRate, uint16(codec.Channels), codec.FmtpLine)
if media.Direction != "" {
md.WithPropertyAttribute(media.Direction)