diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-08-11 16:42:51 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-08-12 17:08:01 -0400 |
commit | 402aad7e871ab242ef16c8c715c50e5a2c236f9a (patch) | |
tree | 6e11ba2c2aa88f1dff7996d831c10e99ace65d12 | |
parent | 329b7b9849daf784afb6e43fdf2e5dd7ea396e7a (diff) | |
download | gst-plugins-bad-402aad7e871ab242ef16c8c715c50e5a2c236f9a.tar.gz gst-plugins-bad-402aad7e871ab242ef16c8c715c50e5a2c236f9a.tar.bz2 gst-plugins-bad-402aad7e871ab242ef16c8c715c50e5a2c236f9a.zip |
dtmfsrc: Empty event queue on finalize
-rw-r--r-- | gst/dtmf/gstdtmfsrc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index 4115395d..7a1f14b2 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -287,6 +287,12 @@ gst_dtmf_src_class_init (GstDTMFSrcClass * klass) gstbasesrc_class->negotiate = GST_DEBUG_FUNCPTR (gst_dtmf_src_negotiate); } +static void +event_free (GstDTMFSrcEvent * event) +{ + if (event) + g_slice_free (GstDTMFSrcEvent, event); +} static void gst_dtmf_src_init (GstDTMFSrc * dtmfsrc, GstDTMFSrcClass * g_class) @@ -297,7 +303,7 @@ gst_dtmf_src_init (GstDTMFSrc * dtmfsrc, GstDTMFSrcClass * g_class) dtmfsrc->interval = DEFAULT_PACKET_INTERVAL; - dtmfsrc->event_queue = g_async_queue_new (); + dtmfsrc->event_queue = g_async_queue_new_full ((GDestroyNotify) event_free); dtmfsrc->last_event = NULL; dtmfsrc->sample_rate = DEFAULT_SAMPLE_RATE; |