diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-16 16:00:30 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-16 16:00:30 +0200 |
commit | 7832b9b43f64996d7a4909710ac9c2f237bdf4fe (patch) | |
tree | 731ec1939b183487e63d4c7c7dea914369ab4d9f | |
parent | fd8defc525fe792d26d3fe3b720055eeab70804d (diff) | |
download | gstreamer-plugins-bad-7832b9b43f64996d7a4909710ac9c2f237bdf4fe.tar.gz |
androidmedia: Handle refcounts of pad templates correctly
gst_pad_template_new() does not take ownership of caps anymore and
gst_element_class_add_pad_template() does take ownership of the
pad template now.
-rw-r--r-- | sys/androidmedia/gstamcaudiodec.c | 4 | ||||
-rw-r--r-- | sys/androidmedia/gstamcvideodec.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/androidmedia/gstamcaudiodec.c b/sys/androidmedia/gstamcaudiodec.c index cd008ca2a..b4be56d80 100644 --- a/sys/androidmedia/gstamcaudiodec.c +++ b/sys/androidmedia/gstamcaudiodec.c @@ -311,12 +311,12 @@ gst_amc_audio_dec_base_init (gpointer g_class) caps = create_sink_caps (codec_info); templ = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps); gst_element_class_add_pad_template (element_class, templ); - gst_object_unref (templ); + gst_caps_unref (caps); caps = create_src_caps (codec_info); templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps); gst_element_class_add_pad_template (element_class, templ); - gst_object_unref (templ); + gst_caps_unref (caps); longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name); gst_element_class_set_metadata (element_class, diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c index d001ddee4..5fa278ba6 100644 --- a/sys/androidmedia/gstamcvideodec.c +++ b/sys/androidmedia/gstamcvideodec.c @@ -444,12 +444,12 @@ gst_amc_video_dec_base_init (gpointer g_class) caps = create_sink_caps (codec_info); templ = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps); gst_element_class_add_pad_template (element_class, templ); - gst_object_unref (templ); + gst_caps_unref (caps); caps = create_src_caps (codec_info); templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps); gst_element_class_add_pad_template (element_class, templ); - gst_object_unref (templ); + gst_caps_unref (caps); longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name); gst_element_class_set_metadata (element_class, |