Commit c75f94c8 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

rtpamrdepay: fix unnecessary sub-buffer creation

We create a sub-buffer just to copy over its metas and then
throw it away immediately, just use the original input buffer
parent a8b86439
......@@ -306,7 +306,6 @@ gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
gint i, num_packets, num_nonempty_packets;
gint amr_len;
gint ILL, ILP;
GstBuffer *buf;
payload_len = gst_rtp_buffer_get_payload_len (rtp);
......@@ -428,10 +427,8 @@ gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
GST_DEBUG_OBJECT (depayload, "pushing buffer of size %" G_GSIZE_FORMAT,
gst_buffer_get_size (outbuf));
buf = gst_rtp_buffer_get_payload_buffer (rtp);
gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpamrdepay), outbuf, buf,
gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpamrdepay), outbuf, rtp->buffer,
g_quark_from_static_string (GST_META_TAG_AUDIO_STR));
gst_buffer_unref (buf);
return outbuf;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment