summaryrefslogtreecommitdiff
path: root/sys/vdpau
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2011-11-28 13:08:27 +0000
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2011-11-28 13:08:27 +0000
commit7521b597f4dc49d8d168f368f0e7ebaf98a72156 (patch)
tree0033ba79e1bf8add58e1dcecffa95f73010bbd10 /sys/vdpau
parent26d6add9457f00ce8ec13844368466f0e3816e5d (diff)
downloadgstreamer-plugins-bad-7521b597f4dc49d8d168f368f0e7ebaf98a72156.tar.gz
various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/gstvdp/gstvdpdecoder.c1
-rw-r--r--sys/vdpau/gstvdpsink.c4
-rw-r--r--sys/vdpau/gstvdpvideopostprocess.c2
-rw-r--r--sys/vdpau/h264/gstvdph264dec.c4
-rw-r--r--sys/vdpau/mpeg/gstvdpmpegdec.c4
-rw-r--r--sys/vdpau/mpeg4/gstvdpmpeg4dec.c4
6 files changed, 11 insertions, 8 deletions
diff --git a/sys/vdpau/gstvdp/gstvdpdecoder.c b/sys/vdpau/gstvdp/gstvdpdecoder.c
index 977f6e6b2..a400a39d6 100644
--- a/sys/vdpau/gstvdp/gstvdpdecoder.c
+++ b/sys/vdpau/gstvdp/gstvdpdecoder.c
@@ -293,6 +293,7 @@ gst_vdp_decoder_base_init (gpointer g_class)
GST_PAD_SRC, GST_PAD_ALWAYS, src_caps);
gst_element_class_add_pad_template (element_class, src_template);
+ gst_object_unref (src_template);
}
static void
diff --git a/sys/vdpau/gstvdpsink.c b/sys/vdpau/gstvdpsink.c
index c3d097fdd..7b9fa2e6c 100644
--- a/sys/vdpau/gstvdpsink.c
+++ b/sys/vdpau/gstvdpsink.c
@@ -1383,8 +1383,8 @@ gst_vdp_sink_base_init (gpointer g_class)
"Sink/Video",
"VDPAU Sink", "Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>");
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_template));
+ gst_element_class_add_static_pad_template (element_class,
+ &sink_template);
}
static void
diff --git a/sys/vdpau/gstvdpvideopostprocess.c b/sys/vdpau/gstvdpvideopostprocess.c
index ced168fec..09e484409 100644
--- a/sys/vdpau/gstvdpvideopostprocess.c
+++ b/sys/vdpau/gstvdpvideopostprocess.c
@@ -1190,12 +1190,14 @@ gst_vdp_vpp_base_init (gpointer gclass)
src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
src_caps);
gst_element_class_add_pad_template (element_class, src_template);
+ gst_object_unref (src_template);
/* SINK PAD */
sink_caps = gst_vdp_video_buffer_get_caps (FALSE, 0);
sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
sink_caps);
gst_element_class_add_pad_template (element_class, sink_template);
+ gst_object_unref (sink_template);
}
/* initialize the vdpaumpegdecoder's class */
diff --git a/sys/vdpau/h264/gstvdph264dec.c b/sys/vdpau/h264/gstvdph264dec.c
index 6c181aff0..6b6c3360a 100644
--- a/sys/vdpau/h264/gstvdph264dec.c
+++ b/sys/vdpau/h264/gstvdph264dec.c
@@ -870,8 +870,8 @@ gst_vdp_h264_dec_base_init (gpointer g_class)
"Decode h264 stream with vdpau",
"Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>");
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_template));
+ gst_element_class_add_static_pad_template (element_class,
+ &sink_template);
}
static void
diff --git a/sys/vdpau/mpeg/gstvdpmpegdec.c b/sys/vdpau/mpeg/gstvdpmpegdec.c
index 3de0eec65..6a473e48e 100644
--- a/sys/vdpau/mpeg/gstvdpmpegdec.c
+++ b/sys/vdpau/mpeg/gstvdpmpegdec.c
@@ -624,8 +624,8 @@ gst_vdp_mpeg_dec_base_init (gpointer gclass)
"Decode mpeg stream with vdpau",
"Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>");
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_template));
+ gst_element_class_add_static_pad_template (element_class,
+ &sink_template);
}
/* initialize the vdpaumpegdecoder's class */
diff --git a/sys/vdpau/mpeg4/gstvdpmpeg4dec.c b/sys/vdpau/mpeg4/gstvdpmpeg4dec.c
index 2ecf434e1..4c1bcb8b3 100644
--- a/sys/vdpau/mpeg4/gstvdpmpeg4dec.c
+++ b/sys/vdpau/mpeg4/gstvdpmpeg4dec.c
@@ -445,8 +445,8 @@ gst_vdp_mpeg4_dec_base_init (gpointer gclass)
"Decode mpeg4 stream with vdpau",
"Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>");
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_template));
+ gst_element_class_add_static_pad_template (element_class,
+ &sink_template);
}
/* initialize the vdpaumpeg4decoder's class */