From 27cc8c527364f19b5fe63255d57734d757545c14 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Tue, 18 Jul 2023 12:05:26 +0200 Subject: [PATCH] Deal with missing profile id for VP9 and H.264. --- group/group.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/group/group.go b/group/group.go index ff377c0..dacbe85 100644 --- a/group/group.go +++ b/group/group.go @@ -199,7 +199,7 @@ func CodecPayloadType(codec webrtc.RTPCodecCapability) (webrtc.PayloadType, erro case "video/vp9": profile := fmtpValue(codec.SDPFmtpLine, "profile-id") switch profile { - case "0": + case "", "0": return 98, nil case "2": return 100, nil @@ -211,6 +211,9 @@ func CodecPayloadType(codec webrtc.RTPCodecCapability) (webrtc.PayloadType, erro return 35, nil case "video/h264": profile := fmtpValue(codec.SDPFmtpLine, "profile-level-id") + if profile == "" { + return 102, nil + } if len(profile) < 4 { return 0, errors.New("malforned H.264 profile") }