mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-03 16:09:39 +00:00
rtpgstpay: Fix memory leak
We were leaking the GList nodes of the pending buffers. https://bugzilla.gnome.org/show_bug.cgi?id=709079
This commit is contained in:
parent
00056965e8
commit
93d5e182d2
1 changed files with 6 additions and 5 deletions
|
@ -353,15 +353,16 @@ static GstFlowReturn
|
||||||
gst_rtp_gst_pay_flush (GstRtpGSTPay * rtpgstpay, GstClockTime timestamp)
|
gst_rtp_gst_pay_flush (GstRtpGSTPay * rtpgstpay, GstClockTime timestamp)
|
||||||
{
|
{
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
GList *iter, *next;
|
GList *iter;
|
||||||
|
|
||||||
gst_rtp_gst_pay_create_from_adapter (rtpgstpay, timestamp);
|
gst_rtp_gst_pay_create_from_adapter (rtpgstpay, timestamp);
|
||||||
for (iter = rtpgstpay->pending_buffers; iter; iter = next) {
|
|
||||||
|
iter = rtpgstpay->pending_buffers;
|
||||||
|
while (iter) {
|
||||||
GstBufferList *list = iter->data;
|
GstBufferList *list = iter->data;
|
||||||
|
|
||||||
next = iter->next;
|
rtpgstpay->pending_buffers = iter =
|
||||||
rtpgstpay->pending_buffers = g_list_remove_link (rtpgstpay->pending_buffers,
|
g_list_delete_link (rtpgstpay->pending_buffers, iter);
|
||||||
iter);
|
|
||||||
|
|
||||||
/* push the whole buffer list at once */
|
/* push the whole buffer list at once */
|
||||||
ret = gst_rtp_base_payload_push_list (GST_RTP_BASE_PAYLOAD (rtpgstpay),
|
ret = gst_rtp_base_payload_push_list (GST_RTP_BASE_PAYLOAD (rtpgstpay),
|
||||||
|
|
Loading…
Reference in a new issue