summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/async_jitter_queue.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-05-14 15:28:36 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-05-14 15:28:36 +0000
commit1e1c12e87ed1d4ec135330653c9390522d3e04dc (patch)
tree8eb1f01d31d0432aa128f19bf752df90e1d717c7 /gst/rtpmanager/async_jitter_queue.c
parent6eb0124ae65fcb49d1b999ce4b8d4d6faba0c05a (diff)
downloadgst-plugins-bad-1e1c12e87ed1d4ec135330653c9390522d3e04dc.tar.gz
gst-plugins-bad-1e1c12e87ed1d4ec135330653c9390522d3e04dc.tar.bz2
gst-plugins-bad-1e1c12e87ed1d4ec135330653c9390522d3e04dc.zip
gst/rtpmanager/async_jitter_queue.c: Fix leak when flushing.
Original commit message from CVS: * gst/rtpmanager/async_jitter_queue.c: (async_jitter_queue_set_flushing_unlocked): Fix leak when flushing. * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_clear_pt_map), (gst_rtp_bin_class_init): * gst/rtpmanager/gstrtpbin.h: Add clear-pt-map signal. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_flush_stop), (gst_rtp_jitter_buffer_sink_event), (gst_rtp_jitter_buffer_loop): Init clock-rate to -1 to mark unknow clock rate. Fix flushing.
Diffstat (limited to 'gst/rtpmanager/async_jitter_queue.c')
-rw-r--r--gst/rtpmanager/async_jitter_queue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/rtpmanager/async_jitter_queue.c b/gst/rtpmanager/async_jitter_queue.c
index ba14d98e..77980c98 100644
--- a/gst/rtpmanager/async_jitter_queue.c
+++ b/gst/rtpmanager/async_jitter_queue.c
@@ -632,6 +632,8 @@ void
async_jitter_queue_set_flushing_unlocked (AsyncJitterQueue * queue,
GFunc free_func, gpointer user_data)
{
+ gpointer elem;
+
g_return_if_fail (queue);
g_return_if_fail (g_atomic_int_get (&queue->ref_count) > 0);
@@ -640,7 +642,8 @@ async_jitter_queue_set_flushing_unlocked (AsyncJitterQueue * queue,
if (queue->waiting_threads > 0)
g_cond_broadcast (queue->cond);
/* free data from queue */
- g_queue_foreach (queue->queue, free_func, user_data);
+ while ((elem = g_queue_pop_head (queue->queue)))
+ free_func (elem, user_data);
}
/**