From 6e1b864739c16e23444ff22e5fd799219dc299c7 Mon Sep 17 00:00:00 2001 From: Aaron Shumway Date: Thu, 19 Sep 2024 15:05:16 -0500 Subject: [PATCH] Add "undefined" payload types to dynamic case This also cameras with non-standard payload types to still be used. --- pkg/format/format.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/format/format.go b/pkg/format/format.go index 657c43ae..5ba0b0f1 100644 --- a/pkg/format/format.go +++ b/pkg/format/format.go @@ -88,7 +88,12 @@ func Unmarshal(mediaType string, payloadType uint8, rtpMap string, fmtp map[stri * dynamic payload types **/ - case payloadType >= 96 && payloadType <= 127: + // The condition has been changed from originally only accepting the range 96 - 127 + // which is defined by the rtp protocol definition as type "dynamic" + // However for use in our system, we have included the additional ranges of 35 - 71 + // and 77 - 95. Which are defined as an "undefined type" by the RTP definition. + // case payloadType >= 96 && payloadType <= 127: + case (payloadType >= 35 && payloadType <= 71) || (payloadType >= 77 && payloadType <= 127): switch { // video