mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
rtpsbcpay: Remove possible extra memcpy for gstreamer plugin.
This commit is contained in:
parent
69c8374b7c
commit
151ad9b28d
1 changed files with 3 additions and 4 deletions
|
@ -168,7 +168,6 @@ gst_rtp_sbc_pay_flush_buffers (GstRtpSBCPay * sbcpay)
|
||||||
guint max_payload;
|
guint max_payload;
|
||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
guint8 *payload_data;
|
guint8 *payload_data;
|
||||||
guint8 *data;
|
|
||||||
guint frame_count;
|
guint frame_count;
|
||||||
guint payload_length;
|
guint payload_length;
|
||||||
struct rtp_payload *payload;
|
struct rtp_payload *payload;
|
||||||
|
@ -200,9 +199,9 @@ gst_rtp_sbc_pay_flush_buffers (GstRtpSBCPay * sbcpay)
|
||||||
memset (payload, 0, sizeof (struct rtp_payload));
|
memset (payload, 0, sizeof (struct rtp_payload));
|
||||||
payload->frame_count = frame_count;
|
payload->frame_count = frame_count;
|
||||||
|
|
||||||
data = gst_adapter_take (sbcpay->adapter, payload_length);
|
gst_adapter_copy (sbcpay->adapter, payload_data +
|
||||||
memcpy (payload_data + RTP_SBC_PAYLOAD_HEADER_SIZE, data, payload_length);
|
RTP_SBC_PAYLOAD_HEADER_SIZE, 0, payload_length);
|
||||||
g_free (data);
|
gst_adapter_flush (sbcpay->adapter, payload_length);
|
||||||
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = sbcpay->timestamp;
|
GST_BUFFER_TIMESTAMP (outbuf) = sbcpay->timestamp;
|
||||||
GST_DEBUG_OBJECT (sbcpay, "Pushing %d bytes", payload_length);
|
GST_DEBUG_OBJECT (sbcpay, "Pushing %d bytes", payload_length);
|
||||||
|
|
Loading…
Reference in a new issue