mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
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.
This commit is contained in:
parent
ba48ddc9a8
commit
3df27a11f2
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue