androidmedia: Handle refcounts of pad templates correctly
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 16 Apr 2013 14:00:30 +0000 (16:00 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 16 Apr 2013 14:24:57 +0000 (16:24 +0200)
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.

sys/androidmedia/gstamcaudiodec.c
sys/androidmedia/gstamcvideodec.c

index cd008ca2a1bb7e69f13524e6b93342c7356515d3..b4be56d801d3a7834fa36b9a7bd1dadf947bf6e7 100644 (file)
@@ -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,
index d001ddee44f2d8ac4f702630659727ef8508b8a2..5fa278ba66fc3e8e9ac2211243314961b87a0bad 100644 (file)
@@ -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,