From e7903311f54e106ee42cf2f61e9724b00d15652d Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 16 Apr 2010 16:34:06 +0200 Subject: [PATCH] rtph263depay: handle a few FIXMEs --- gst/rtp/gstrtph263depay.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gst/rtp/gstrtph263depay.c b/gst/rtp/gstrtph263depay.c index 8cd4f42773..f061e97a6a 100644 --- a/gst/rtp/gstrtph263depay.c +++ b/gst/rtp/gstrtph263depay.c @@ -270,17 +270,17 @@ gst_rtp_h263_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) } if (!EBIT) { - GstBuffer *tmp = gst_buffer_new_and_alloc (payload_len); + GstBuffer *tmp; - /* Copy the entire buffer, FIXME, use subbuffers */ - memcpy (GST_BUFFER_DATA (tmp), payload, payload_len); + /* Take the entire buffer */ + tmp = gst_rtp_buffer_get_payload_subbuffer (buf, header_len, payload_len); gst_adapter_push (rtph263depay->adapter, tmp); } else { - GstBuffer *tmp = gst_buffer_new_and_alloc (payload_len - 1); + GstBuffer *tmp; - /* Copy the entire buffer except for the last byte. FIXME, use - * subbuffers. */ - memcpy (GST_BUFFER_DATA (tmp), payload, payload_len - 1); + /* Take the entire buffer except for the last byte */ + tmp = gst_rtp_buffer_get_payload_subbuffer (buf, header_len, + payload_len - 1); gst_adapter_push (rtph263depay->adapter, tmp); /* Put the last byte into the leftover */