diff options
author | Olivier Crête <olivier.crete@collabora.com> | 2014-11-29 18:35:42 -0500 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-12-12 01:50:15 +0000 |
commit | 7b027f01c1c343e3c96552923bf57ec336c9bda2 (patch) | |
tree | bcbb1eef211a9b37a1d4ad91aea0dc965ee7c0e6 | |
parent | 75f33013791721c1370f09ec8028aa370cd91db8 (diff) |
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.
-rw-r--r-- | gst/rtpmanager/gstrtprtxreceive.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtprtxreceive.c b/gst/rtpmanager/gstrtprtxreceive.c index 52f6b017c..b7a30e6ca 100644 --- a/gst/rtpmanager/gstrtprtxreceive.c +++ b/gst/rtpmanager/gstrtprtxreceive.c @@ -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); } |