rtpmanager: don't map READWRITE in twcc header ext
authorAlbert Sjolund <alberts@axis.com>
Fri, 15 Nov 2024 10:44:17 +0000 (11:44 +0100)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Sun, 17 Nov 2024 11:31:16 +0000 (11:31 +0000)
There is no need to map the buffer as writable, as there is
only a read performed on the mapped buffer. This is in line
with other header extensions, as no other extensions maps
it as readwrite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7910>

subprojects/gst-plugins-good/gst/rtpmanager/gstrtphdrext-twcc.c

index 2457337d0ba364c397aa205288737cdbb9bb4470..78412be76cc784ac5bd327440ee672a07b7331ab 100644 (file)
@@ -179,7 +179,7 @@ gst_rtp_header_extension_twcc_write (GstRTPHeaderExtension * ext,
   g_return_val_if_fail (write_flags &
       gst_rtp_header_extension_twcc_get_supported_flags (ext), -1);
 
-  if (!gst_rtp_buffer_map (output, GST_MAP_READWRITE, &rtp))
+  if (!gst_rtp_buffer_map (output, GST_MAP_READ, &rtp))
     goto map_failed;
 
   /* if there already is a twcc-seqnum inside the packet */