mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
rtpvrawdepay: fix major memory leak and performance issue
We call gst_rtp_buffer_get_payload() which creates a sub-buffer of each input buffer, just to copy over metas, and then leak it. https://bugzilla.gnome.org/show_bug.cgi?id=760289
This commit is contained in:
parent
98fddf090c
commit
a8b8643977
1 changed files with 3 additions and 4 deletions
|
@ -330,7 +330,7 @@ gst_rtp_vraw_depay_process_packet (GstRTPBaseDepayload * depayload,
|
|||
gint width, height, xinc, yinc;
|
||||
GstVideoFrame *frame;
|
||||
gboolean marker;
|
||||
GstBuffer *buf, *outbuf = NULL;
|
||||
GstBuffer *outbuf = NULL;
|
||||
|
||||
rtpvrawdepay = GST_RTP_VRAW_DEPAY (depayload);
|
||||
|
||||
|
@ -398,7 +398,6 @@ gst_rtp_vraw_depay_process_packet (GstRTPBaseDepayload * depayload,
|
|||
|
||||
payload = gst_rtp_buffer_get_payload (rtp);
|
||||
payload_len = gst_rtp_buffer_get_payload_len (rtp);
|
||||
buf = gst_rtp_buffer_get_payload_buffer (rtp);
|
||||
|
||||
if (payload_len < 3)
|
||||
goto short_packet;
|
||||
|
@ -410,8 +409,8 @@ gst_rtp_vraw_depay_process_packet (GstRTPBaseDepayload * depayload,
|
|||
/* remember header position */
|
||||
headers = payload;
|
||||
|
||||
gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpvrawdepay), frame->buffer, buf,
|
||||
g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
|
||||
gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpvrawdepay), frame->buffer,
|
||||
rtp->buffer, g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
|
||||
|
||||
/* find data start */
|
||||
do {
|
||||
|
|
Loading…
Reference in a new issue