summaryrefslogtreecommitdiffstats
path: root/gst/flx/gstflxdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/flx/gstflxdec.c')
-rw-r--r--gst/flx/gstflxdec.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index ec7f1981..6f9cb7fe 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -68,6 +68,7 @@ static GstStaticPadTemplate src_video_factory = GST_STATIC_PAD_TEMPLATE ("src",
static void gst_flxdec_class_init (GstFlxDecClass * klass);
static void gst_flxdec_base_init (GstFlxDecClass * klass);
static void gst_flxdec_init (GstFlxDec * flxdec);
+static void gst_flxdec_dispose (GstFlxDec * flxdec);
static GstFlowReturn gst_flxdec_chain (GstPad * pad, GstBuffer * buf);
@@ -134,6 +135,8 @@ gst_flxdec_class_init (GstFlxDecClass * klass)
parent_class = g_type_class_peek_parent (klass);
+ gobject_class->dispose = (GObjectFinalizeFunc) gst_flxdec_dispose;
+
GST_DEBUG_CATEGORY_INIT (flxdec_debug, "flxdec", 0, "FLX video decoder");
gstelement_class->change_state = gst_flxdec_change_state;
@@ -160,6 +163,17 @@ gst_flxdec_init (GstFlxDec * flxdec)
flxdec->adapter = gst_adapter_new ();
}
+static void
+gst_flxdec_dispose (GstFlxDec * flxdec)
+{
+ if (flxdec->adapter) {
+ g_object_unref (flxdec->adapter);
+ flxdec->adapter = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose ((GObject *) flxdec);
+}
+
static gboolean
gst_flxdec_src_query_handler (GstPad * pad, GstQuery * query)
{