summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2007-09-17 00:16:59 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-21 17:48:03 +0100
commit244585496bddfd6ac3ecc4eeb3bcb2a87ca9455e (patch)
tree4f32412a31a0e42fc99895e515c2f074aa14a6a6 /gst
parent95eef52a7774a30a117e48b857b425b64fa7d1e1 (diff)
downloadgst-plugins-bad-244585496bddfd6ac3ecc4eeb3bcb2a87ca9455e.tar.gz
gst-plugins-bad-244585496bddfd6ac3ecc4eeb3bcb2a87ca9455e.tar.bz2
gst-plugins-bad-244585496bddfd6ac3ecc4eeb3bcb2a87ca9455e.zip
[MOVED FROM GST-P-FARSIGHT] Properly free non-start events
20070917001659-3e2dc-a571777e3ecfb90989f87412f554aa10a31cc2ca.gz
Diffstat (limited to 'gst')
-rw-r--r--gst/dtmf/gstdtmfsrc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c
index 866a7191..0b8fb203 100644
--- a/gst/dtmf/gstdtmfsrc.c
+++ b/gst/dtmf/gstdtmfsrc.c
@@ -652,6 +652,7 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset,
event->packet_count = 0;
dtmfsrc->last_event = event;
+ event = NULL;
break;
case DTMF_EVENT_TYPE_PAUSE_TASK:
/*
@@ -667,6 +668,8 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset,
GST_OBJECT_UNLOCK (dtmfsrc);
break;
}
+ if (event)
+ g_free (event);
} else if (dtmfsrc->last_event->packet_count * dtmfsrc->interval >=
MIN_DUTY_CYCLE) {
event = g_async_queue_try_pop (dtmfsrc->event_queue);
@@ -700,6 +703,7 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset,
break;
}
+ g_free (event);
}
}
} while (dtmfsrc->last_event == NULL);