mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 23:42:28 +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;
|
gint width, height, xinc, yinc;
|
||||||
GstVideoFrame *frame;
|
GstVideoFrame *frame;
|
||||||
gboolean marker;
|
gboolean marker;
|
||||||
GstBuffer *buf, *outbuf = NULL;
|
GstBuffer *outbuf = NULL;
|
||||||
|
|
||||||
rtpvrawdepay = GST_RTP_VRAW_DEPAY (depayload);
|
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 = gst_rtp_buffer_get_payload (rtp);
|
||||||
payload_len = gst_rtp_buffer_get_payload_len (rtp);
|
payload_len = gst_rtp_buffer_get_payload_len (rtp);
|
||||||
buf = gst_rtp_buffer_get_payload_buffer (rtp);
|
|
||||||
|
|
||||||
if (payload_len < 3)
|
if (payload_len < 3)
|
||||||
goto short_packet;
|
goto short_packet;
|
||||||
|
@ -410,8 +409,8 @@ gst_rtp_vraw_depay_process_packet (GstRTPBaseDepayload * depayload,
|
||||||
/* remember header position */
|
/* remember header position */
|
||||||
headers = payload;
|
headers = payload;
|
||||||
|
|
||||||
gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpvrawdepay), frame->buffer, buf,
|
gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpvrawdepay), frame->buffer,
|
||||||
g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
|
rtp->buffer, g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
|
||||||
|
|
||||||
/* find data start */
|
/* find data start */
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in a new issue