mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
rtpsource: Use g_queue_foreach() to unref all buffers in queues
This commit is contained in:
parent
54e924332e
commit
9f18a271f3
1 changed files with 2 additions and 5 deletions
|
@ -280,12 +280,10 @@ static void
|
||||||
rtp_source_finalize (GObject * object)
|
rtp_source_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
RTPSource *src;
|
RTPSource *src;
|
||||||
GstBuffer *buffer;
|
|
||||||
|
|
||||||
src = RTP_SOURCE_CAST (object);
|
src = RTP_SOURCE_CAST (object);
|
||||||
|
|
||||||
while ((buffer = g_queue_pop_head (src->packets)))
|
g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL);
|
||||||
gst_buffer_unref (buffer);
|
|
||||||
g_queue_free (src->packets);
|
g_queue_free (src->packets);
|
||||||
|
|
||||||
gst_structure_free (src->sdes);
|
gst_structure_free (src->sdes);
|
||||||
|
@ -296,8 +294,7 @@ rtp_source_finalize (GObject * object)
|
||||||
|
|
||||||
g_list_free_full (src->conflicting_addresses,
|
g_list_free_full (src->conflicting_addresses,
|
||||||
(GDestroyNotify) rtp_conflicting_address_free);
|
(GDestroyNotify) rtp_conflicting_address_free);
|
||||||
while ((buffer = g_queue_pop_head (src->retained_feedback)))
|
g_queue_foreach (src->retained_feedback, (GFunc) gst_buffer_unref, NULL);
|
||||||
gst_buffer_unref (buffer);
|
|
||||||
g_queue_free (src->retained_feedback);
|
g_queue_free (src->retained_feedback);
|
||||||
|
|
||||||
g_array_free (src->nacks, TRUE);
|
g_array_free (src->nacks, TRUE);
|
||||||
|
|
Loading…
Reference in a new issue