summaryrefslogtreecommitdiff
path: root/gst/gdp
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-11-29 13:16:56 +0000
committerTim-Philipp Müller <tim@centricular.com>2014-11-30 14:38:22 +0000
commit83d9353d588a880912d9329f41d177572639b39e (patch)
treeddc4d5f9348abbf000fa59434f6a2b0001bbb864 /gst/gdp
parent82b0ecf1945530124271c3bee26e5cf4ac180568 (diff)
gdppay: minor caps event payloading optimisation
Avoid creation of buffer we're just going to throw away two lines later anyway.
Diffstat (limited to 'gst/gdp')
-rw-r--r--gst/gdp/gstgdppay.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/gdp/gstgdppay.c b/gst/gdp/gstgdppay.c
index 0422a78f0..db8cbf523 100644
--- a/gst/gdp/gstgdppay.c
+++ b/gst/gdp/gstgdppay.c
@@ -209,7 +209,6 @@ static GstBuffer *
gst_gdp_buffer_from_caps (GstGDPPay * this, GstCaps * caps)
{
GstBuffer *headerbuf;
- GstBuffer *payloadbuf;
guint8 *header, *payload;
guint len, plen;
@@ -221,9 +220,11 @@ gst_gdp_buffer_from_caps (GstGDPPay * this, GstCaps * caps)
headerbuf = gst_buffer_new_wrapped (header, len);
plen = gst_dp_header_payload_length (header);
- payloadbuf = gst_buffer_new_wrapped (payload, plen);
- return gst_buffer_append (headerbuf, payloadbuf);
+ gst_buffer_append_memory (headerbuf,
+ gst_memory_new_wrapped (0, payload, plen, 0, plen, payload, g_free));
+
+ return headerbuf;
/* ERRORS */
packet_failed: