summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>2014-12-05 12:52:51 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2015-01-27 16:38:39 -0500
commiteda61c44c79956eaa5723725d31d606a9df67c92 (patch)
treecc2a881532aa104dcf1408690d6d4dbc7f43db9d /gst
parent645b9490bb3ec507cac2b01061c9b67c18abb5ae (diff)
downloadfarstream-eda61c44c79956eaa5723725d31d606a9df67c92.tar.gz
rtpxdatapay: Use gst_buffer_copy_into to avoid unreffing the buffer
Diffstat (limited to 'gst')
-rw-r--r--gst/fsrtpxdata/fsrtpxdatapay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/fsrtpxdata/fsrtpxdatapay.c b/gst/fsrtpxdata/fsrtpxdatapay.c
index 90a4d6b9..506bab70 100644
--- a/gst/fsrtpxdata/fsrtpxdatapay.c
+++ b/gst/fsrtpxdata/fsrtpxdatapay.c
@@ -127,11 +127,13 @@ fs_rtp_xdata_pay_handle_buffer (GstRTPBasePayload *payload, GstBuffer *buffer)
new_size = size > mtu ? mtu : size;
rtpbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
- rtpbuf = gst_buffer_append_region (rtpbuf, buffer, offset, new_size);
+ gst_buffer_copy_into (rtpbuf, buffer, GST_BUFFER_COPY_MEMORY |
+ GST_BUFFER_COPY_TIMESTAMPS, offset, new_size);
gst_buffer_list_add (rtplist, rtpbuf);
offset += new_size;
size -= new_size;
}
+ gst_buffer_unref (buffer);
return gst_rtp_base_payload_push_list (payload, rtplist);
}
}