summaryrefslogtreecommitdiffstats
path: root/sys/vdpau/gstvdpaudecoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vdpau/gstvdpaudecoder.c')
-rw-r--r--sys/vdpau/gstvdpaudecoder.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/vdpau/gstvdpaudecoder.c b/sys/vdpau/gstvdpaudecoder.c
index deb93c49..8d5ed4e5 100644
--- a/sys/vdpau/gstvdpaudecoder.c
+++ b/sys/vdpau/gstvdpaudecoder.c
@@ -57,6 +57,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_BOILERPLATE_FULL (GstVdpauDecoder, gst_vdpaudecoder, GstElement,
GST_TYPE_ELEMENT, DEBUG_INIT);
+static void gst_vdpau_decoder_finalize (GObject * object);
static void gst_vdpaudecoder_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_vdpaudecoder_get_property (GObject * object, guint prop_id,
@@ -453,6 +454,7 @@ gst_vdpaudecoder_class_init (GstVdpauDecoderClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
+ gobject_class->finalize = gst_vdpau_decoder_finalize;
gobject_class->set_property = gst_vdpaudecoder_set_property;
gobject_class->get_property = gst_vdpaudecoder_get_property;
@@ -495,6 +497,19 @@ gst_vdpaudecoder_init (GstVdpauDecoder * dec, GstVdpauDecoderClass * klass)
}
static void
+gst_vdpau_decoder_finalize (GObject * object)
+{
+ GstVdpauDecoder *dec = (GstVdpauDecoder *) object;
+
+ if (dec->src_caps)
+ g_object_unref (dec->src_caps);
+ if (dec->device)
+ g_object_unref (dec->device);
+
+ g_free (dec->display_name);
+}
+
+static void
gst_vdpaudecoder_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{