summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2007-03-04 17:13:19 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2007-03-04 17:13:19 +0000
commitd5706e78aade832ed0aec0b977a0de9460d852ea (patch)
tree24d8d3210ce8555dcfe53ace1bb670945754e372
parent5114bbb5c223d7c07ed960ab23a8859bf6535b44 (diff)
ext/cdio/gstcdiocddasrc.c: Make sure we always destroy our libcdio handle.
Original commit message from CVS: * ext/cdio/gstcdiocddasrc.c: (gst_cdio_cdda_src_open), (gst_cdio_cdda_src_finalize): Make sure we always destroy our libcdio handle.
-rw-r--r--ChangeLog6
-rw-r--r--ext/cdio/gstcdiocddasrc.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f9b76c8..b357840d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2007-03-04 Jan Schmidt <thaytan@mad.scientist.com>
+ * ext/cdio/gstcdiocddasrc.c: (gst_cdio_cdda_src_open),
+ (gst_cdio_cdda_src_finalize):
+ Make sure we always destroy our libcdio handle.
+
+2007-03-04 Jan Schmidt <thaytan@mad.scientist.com>
+
* tests/check/Makefile.am:
Disable autovideosink so the buildbots don't barf over memory
leaked in the directfb sink.
diff --git a/ext/cdio/gstcdiocddasrc.c b/ext/cdio/gstcdiocddasrc.c
index 0e8967ea..ca3258ee 100644
--- a/ext/cdio/gstcdiocddasrc.c
+++ b/ext/cdio/gstcdiocddasrc.c
@@ -287,6 +287,9 @@ not_audio:
{
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Disc is not an Audio CD.")), ("discmode: %d", (gint) discmode));
+
+ cdio_destroy (src->cdio);
+ src->cdio = NULL;
return FALSE;
}
}
@@ -312,6 +315,13 @@ gst_cdio_cdda_src_init (GstCdioCddaSrc * src, GstCdioCddaSrcClass * klass)
static void
gst_cdio_cdda_src_finalize (GObject * obj)
{
+ GstCdioCddaSrc *src = GST_CDIO_CDDA_SRC (obj);
+
+ if (src->cdio) {
+ cdio_destroy (src->cdio);
+ src->cdio = NULL;
+ }
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}