mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-09 05:11:53 +00:00
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.
This commit is contained in:
parent
fd8defc525
commit
7832b9b43f
2 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue