mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
rtpdvdepay: 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 directly.
This commit is contained in:
parent
c75f94c8f5
commit
6171b0a675
1 changed files with 1 additions and 4 deletions
|
@ -297,7 +297,6 @@ static GstBuffer *
|
|||
gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstRTPBuffer * rtp)
|
||||
{
|
||||
GstBuffer *out = NULL;
|
||||
GstBuffer *payload_buf;
|
||||
guint8 *payload;
|
||||
guint32 rtp_ts;
|
||||
guint payload_len, location;
|
||||
|
@ -326,7 +325,6 @@ gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstRTPBuffer * rtp)
|
|||
/* Extract the payload */
|
||||
payload_len = gst_rtp_buffer_get_payload_len (rtp);
|
||||
payload = gst_rtp_buffer_get_payload (rtp);
|
||||
payload_buf = gst_rtp_buffer_get_payload_buffer (rtp);
|
||||
|
||||
/* copy all DIF chunks in their place. */
|
||||
gst_buffer_map (dvdepay->acc, &map, GST_MAP_READWRITE);
|
||||
|
@ -353,7 +351,7 @@ gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstRTPBuffer * rtp)
|
|||
if (offset <= dvdepay->frame_size - 80) {
|
||||
memcpy (map.data + offset, payload, 80);
|
||||
gst_rtp_copy_meta (GST_ELEMENT_CAST (dvdepay), dvdepay->acc,
|
||||
payload_buf, 0);
|
||||
rtp->buffer, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,7 +359,6 @@ gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstRTPBuffer * rtp)
|
|||
payload_len -= 80;
|
||||
}
|
||||
gst_buffer_unmap (dvdepay->acc, &map);
|
||||
gst_buffer_unref (payload_buf);
|
||||
|
||||
if (marker) {
|
||||
GST_DEBUG_OBJECT (dvdepay, "marker bit complete frame %u", rtp_ts);
|
||||
|
|
Loading…
Reference in a new issue