Skip to content

Commit

Permalink
rtpbasepayload: map RTP buffer READWRITE when setting headers
Browse files Browse the repository at this point in the history
GstRTPHeaderExtension::write can map the RTP buffer for reading. If that
happens on a buffer that is already mapped WRITE-only by the payloader,
the payloader's mapping gets invalidated (GstRTPBuffer::map will point
to a different instance of GstMemory).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1173>
  • Loading branch information
xhaakon committed Jun 28, 2021
1 parent b4caa6c commit e2e9e32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gst-libs/gst/rtp/gstrtpbasepayload.c
Expand Up @@ -1711,7 +1711,7 @@ set_headers (GstBuffer ** buffer, guint idx, gpointer user_data)
HeaderExt hdrext = { NULL, };
GstRTPBuffer rtp = { NULL, };

if (!gst_rtp_buffer_map (*buffer, GST_MAP_WRITE, &rtp))
if (!gst_rtp_buffer_map (*buffer, GST_MAP_READWRITE, &rtp))
goto map_failed;

gst_rtp_buffer_set_ssrc (&rtp, data->ssrc);
Expand Down

0 comments on commit e2e9e32

Please sign in to comment.