From eb641af4504a66c47e16c0f559120de7f7fc9dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 22 Feb 2024 13:29:19 +0200 Subject: [PATCH] rtp: Fix constant for maximum two-byte RTP header extension length The value is stored as an 8 bit integer, with 0 meaning that there is not data for this extension. That means that the maximum length is 255 bytes and not 256 bytes. On the other hand, the one-byte RTP header extensions are storing the length as a 4 bit integer with an offset of 1 (i.e. 0 means 1 byte extension length), so here 16 is the correct maximum length. Part-of: --- .../gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c index 648b34e153..4939001db7 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c @@ -114,7 +114,7 @@ static guint gst_rtp_base_payload_signals[LAST_SIGNAL] = { 0 }; #define DEFAULT_AUTO_HEADER_EXTENSION TRUE #define RTP_HEADER_EXT_ONE_BYTE_MAX_SIZE 16 -#define RTP_HEADER_EXT_TWO_BYTE_MAX_SIZE 256 +#define RTP_HEADER_EXT_TWO_BYTE_MAX_SIZE 255 #define RTP_HEADER_EXT_ONE_BYTE_MAX_ID 14 #define RTP_HEADER_EXT_TWO_BYTE_MAX_ID 255