summaryrefslogtreecommitdiffstats
path: root/ext/timidity
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-09-20 15:06:23 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-09-20 15:06:23 +0000
commitac256b5d1580ce1691d38192132b3ebbfa661e3c (patch)
tree998a7ac34735ee7727ddb322df14ccdd9c19f7f2 /ext/timidity
parent7067d01d2a9e46a52f347cfa777e5a50f1d41494 (diff)
downloadgst-plugins-bad-ac256b5d1580ce1691d38192132b3ebbfa661e3c.tar.gz
gst-plugins-bad-ac256b5d1580ce1691d38192132b3ebbfa661e3c.tar.bz2
gst-plugins-bad-ac256b5d1580ce1691d38192132b3ebbfa661e3c.zip
Fix memory leaks. More to come.
Original commit message from CVS: * ext/alsaspdif/alsaspdifsink.c: * ext/timidity/gsttimidity.c: * ext/timidity/gstwildmidi.c: * gst/mpegvideoparse/mpegvideoparse.c: Fix memory leaks. More to come. * tests/check/Makefile.am: * tests/check/generic/states.c: Improved state change unit test.
Diffstat (limited to 'ext/timidity')
-rw-r--r--ext/timidity/gsttimidity.c10
-rw-r--r--ext/timidity/gstwildmidi.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/ext/timidity/gsttimidity.c b/ext/timidity/gsttimidity.c
index bbd89c98..1a51fe38 100644
--- a/ext/timidity/gsttimidity.c
+++ b/ext/timidity/gsttimidity.c
@@ -818,17 +818,19 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
static gchar *exts[] = { "mid", "midi", NULL };
- /* exchange the strings 'plugin' and 'Template plugin' with your
- * plugin name and description */
+ GstCaps *caps;
+
GST_DEBUG_CATEGORY_INIT (gst_timidity_debug, "timidity",
0, "Timidity plugin");
+ caps = gst_caps_new_simple ("audio/midi", NULL);
if (!gst_type_find_register (plugin, "audio/midi", GST_RANK_PRIMARY,
- gst_timidity_typefind, exts,
- gst_caps_new_simple ("audio/midi", NULL), NULL, NULL)) {
+ gst_timidity_typefind, exts, caps, NULL, NULL)) {
GST_WARNING ("can't register typefind");
+ gst_caps_unref (caps);
return FALSE;
}
+ gst_caps_unref (caps);
return gst_element_register (plugin, "timidity",
GST_RANK_PRIMARY, GST_TYPE_TIMIDITY);
diff --git a/ext/timidity/gstwildmidi.c b/ext/timidity/gstwildmidi.c
index 16b9f172..e975a18a 100644
--- a/ext/timidity/gstwildmidi.c
+++ b/ext/timidity/gstwildmidi.c
@@ -912,17 +912,19 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
static gchar *exts[] = { "mid", "midi", NULL };
- /* exchange the strings 'plugin' and 'Template plugin' with your
- * plugin name and description */
+ GstCaps *caps;
+
GST_DEBUG_CATEGORY_INIT (gst_wildmidi_debug, "wildmidi",
0, "Wildmidi plugin");
+ caps = gst_caps_new_simple ("audio/midi", NULL);
if (!gst_type_find_register (plugin, "audio/midi", GST_RANK_SECONDARY,
- gst_wildmidi_typefind, exts,
- gst_caps_new_simple ("audio/midi", NULL), NULL, NULL)) {
+ gst_wildmidi_typefind, exts, caps, NULL, NULL)) {
GST_WARNING ("can't register typefind");
+ gst_caps_unref (caps);
return FALSE;
}
+ gst_caps_unref (caps);
return gst_element_register (plugin, "wildmidi",
GST_RANK_SECONDARY, GST_TYPE_WILDMIDI);