mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
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.
This commit is contained in:
parent
023a1637d9
commit
ccac1f8c0b
1 changed files with 4 additions and 2 deletions
|
@ -427,12 +427,14 @@ _gst_rtp_buffer_new_from_rtx (GstRTPBuffer * rtp, guint32 ssrc1,
|
|||
guint payload_len = 0;
|
||||
|
||||
/* 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);
|
||||
|
||||
/* copy extension if any */
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue