diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-06-13 10:06:57 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-06-19 11:03:14 +0200 |
commit | 6fc47a92dfe9d3339ff3f55111054c313bf46717 (patch) | |
tree | 3654060661e1423f2df281ee75ef9028a58019c4 /gst/frei0r | |
parent | 455981d3368ba99b1a69f1968629d7cd036fd7ff (diff) | |
download | gst-plugins-bad-6fc47a92dfe9d3339ff3f55111054c313bf46717.tar.gz gst-plugins-bad-6fc47a92dfe9d3339ff3f55111054c313bf46717.tar.bz2 gst-plugins-bad-6fc47a92dfe9d3339ff3f55111054c313bf46717.zip |
frei0r: Destroy the f0r_instance_t in stop()
Diffstat (limited to 'gst/frei0r')
-rw-r--r-- | gst/frei0r/gstfrei0rsrc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/frei0r/gstfrei0rsrc.c b/gst/frei0r/gstfrei0rsrc.c index 433d0203..77d29964 100644 --- a/gst/frei0r/gstfrei0rsrc.c +++ b/gst/frei0r/gstfrei0rsrc.c @@ -26,6 +26,9 @@ #include "gstfrei0r.h" #include "gstfrei0rsrc.h" +GST_DEBUG_CATEGORY_EXTERN (frei0r_debug); +#define GST_CAT_DEFAULT frei0r_debug + typedef struct { f0r_plugin_info_t info; @@ -147,6 +150,20 @@ gst_frei0r_src_start (GstBaseSrc * basesrc) } static gboolean +gst_frei0r_src_stop (GstBaseSrc * basesrc) +{ + GstFrei0rSrc *self = GST_FREI0R_SRC (basesrc); + GstFrei0rSrcClass *klass = GST_FREI0R_SRC_GET_CLASS (basesrc); + + if (self->f0r_instance) { + klass->ftable->destruct (self->f0r_instance); + self->f0r_instance = NULL; + } + + return TRUE; +} + +static gboolean gst_frei0r_src_is_seekable (GstBaseSrc * psrc) { return TRUE; @@ -346,6 +363,7 @@ gst_frei0r_src_class_init (GstFrei0rSrcClass * klass, gstbasesrc_class->query = gst_frei0r_src_query; gstbasesrc_class->get_times = gst_frei0r_src_get_times; gstbasesrc_class->start = gst_frei0r_src_start; + gstbasesrc_class->stop = gst_frei0r_src_stop; gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_frei0r_src_create); } |