Skip to content
Snippets Groups Projects
Commit 7b027f01 authored by Olivier Crête's avatar Olivier Crête :ghost: Committed by Tim-Philipp Müller
Browse files

rtprtxreceive: Use offset when copying header

The header is not always at the start of the packet, so we need to compute
the offset first.
parent 75f33013
No related branches found
No related tags found
Loading
...@@ -427,12 +427,14 @@ _gst_rtp_buffer_new_from_rtx (GstRTPBuffer * rtp, guint32 ssrc1, ...@@ -427,12 +427,14 @@ _gst_rtp_buffer_new_from_rtx (GstRTPBuffer * rtp, guint32 ssrc1,
guint payload_len = 0; guint payload_len = 0;
/* copy fixed header */ /* copy fixed header */
mem = gst_memory_copy (rtp->map[0].memory, 0, rtp->size[0]); mem = gst_memory_copy (rtp->map[0].memory,
(guint8 *) rtp->data[0] - rtp->map[0].data, rtp->size[0]);
gst_buffer_append_memory (new_buffer, mem); gst_buffer_append_memory (new_buffer, mem);
/* copy extension if any */ /* copy extension if any */
if (rtp->size[1]) { if (rtp->size[1]) {
mem = gst_memory_copy (rtp->map[1].memory, 0, rtp->size[1]); mem = gst_memory_copy (rtp->map[1].memory,
(guint8 *) rtp->data[1] - rtp->map[1].data, rtp->size[1]);
gst_buffer_append_memory (new_buffer, mem); gst_buffer_append_memory (new_buffer, mem);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment