Skip to content

Commit

Permalink
Merge pull request #11 from jaygno/master
Browse files Browse the repository at this point in the history
fix panic without finerprint
  • Loading branch information
notedit committed Aug 4, 2022
2 parents 0b9a952 + 9f8994e commit 059e378
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sdpinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,19 +826,18 @@ func Parse(sdp string) (*SDPInfo, error) {
sdpInfo.AddCandidate(candidateInfo)
}

var fingerpirnt *transform.FingerprintStruct
var remoteHash, remoteFingerprint string

if sdpMap.Fingerprint != nil {
fingerpirnt = sdpMap.Fingerprint
remoteHash = sdpMap.Fingerprint.Type
remoteFingerprint = sdpMap.Fingerprint.Hash
}

if md.Fingerprint != nil {
fingerpirnt = md.Fingerprint
remoteHash = md.Fingerprint.Type
remoteFingerprint = md.Fingerprint.Hash
}

remoteHash := fingerpirnt.Type
remoteFingerprint := fingerpirnt.Hash

setup := SETUPACTPASS

if md.Setup != "" {
Expand Down

0 comments on commit 059e378

Please sign in to comment.