mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-28 05:51:59 -08:00
fix sdp filtering
This commit is contained in:
parent
215a44fd33
commit
f46d6f4ba2
1 changed files with 9 additions and 1 deletions
10
client.go
10
client.go
|
|
@ -34,10 +34,18 @@ func sdpParse(in []byte) (*sdp.Message, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
// remove everything from SDP except infos about the tracks
|
||||
// remove everything from SDP except the bare minimum
|
||||
func sdpFilter(msgIn *sdp.Message, byteIn []byte) (*sdp.Message, []byte) {
|
||||
msgOut := &sdp.Message{}
|
||||
|
||||
msgOut.Name = "Stream"
|
||||
msgOut.Origin = sdp.Origin{
|
||||
Username: "-",
|
||||
NetworkType: "IN",
|
||||
AddressType: "IP4",
|
||||
Address: "127.0.0.1",
|
||||
}
|
||||
|
||||
for i, m := range msgIn.Medias {
|
||||
var attributes []sdp.Attribute
|
||||
for _, attr := range m.Attributes {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue