Skip to content

Commit

Permalink
fix sdp filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Jan 21, 2020
1 parent 215a44f commit f46d6f4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f46d6f4

Please sign in to comment.