mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-03 16:09:39 +00:00
plugins: fix pad template ref leaks.
This commit is contained in:
parent
fc596d1ea9
commit
f64bafea59
4 changed files with 25 additions and 28 deletions
|
@ -408,20 +408,19 @@ static void
|
|||
gst_vaapidecode_base_init(gpointer klass)
|
||||
{
|
||||
GstElementClass * const element_class = GST_ELEMENT_CLASS(klass);
|
||||
GstPadTemplate *pad_template;
|
||||
|
||||
gst_element_class_set_details(element_class, &gst_vaapidecode_details);
|
||||
|
||||
/* sink pad */
|
||||
gst_element_class_add_pad_template(
|
||||
element_class,
|
||||
gst_static_pad_template_get(&gst_vaapidecode_sink_factory)
|
||||
);
|
||||
pad_template = gst_static_pad_template_get(&gst_vaapidecode_sink_factory);
|
||||
gst_element_class_add_pad_template(element_class, pad_template);
|
||||
gst_object_unref(pad_template);
|
||||
|
||||
/* src pad */
|
||||
gst_element_class_add_pad_template(
|
||||
element_class,
|
||||
gst_static_pad_template_get(&gst_vaapidecode_src_factory)
|
||||
);
|
||||
pad_template = gst_static_pad_template_get(&gst_vaapidecode_src_factory);
|
||||
gst_element_class_add_pad_template(element_class, pad_template);
|
||||
gst_object_unref(pad_template);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -220,20 +220,19 @@ static void
|
|||
gst_vaapidownload_base_init(gpointer klass)
|
||||
{
|
||||
GstElementClass * const element_class = GST_ELEMENT_CLASS(klass);
|
||||
GstPadTemplate *pad_template;
|
||||
|
||||
gst_element_class_set_details(element_class, &gst_vaapidownload_details);
|
||||
|
||||
/* sink pad */
|
||||
gst_element_class_add_pad_template(
|
||||
element_class,
|
||||
gst_static_pad_template_get(&gst_vaapidownload_sink_factory)
|
||||
);
|
||||
pad_template = gst_static_pad_template_get(&gst_vaapidownload_sink_factory);
|
||||
gst_element_class_add_pad_template(element_class, pad_template);
|
||||
gst_object_unref(pad_template);
|
||||
|
||||
/* src pad */
|
||||
gst_element_class_add_pad_template(
|
||||
element_class,
|
||||
gst_static_pad_template_get(&gst_vaapidownload_src_factory)
|
||||
);
|
||||
pad_template = gst_static_pad_template_get(&gst_vaapidownload_src_factory);
|
||||
gst_element_class_add_pad_template(element_class, pad_template);
|
||||
gst_object_unref(pad_template);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -784,13 +784,13 @@ static void
|
|||
gst_vaapisink_base_init(gpointer klass)
|
||||
{
|
||||
GstElementClass * const element_class = GST_ELEMENT_CLASS(klass);
|
||||
GstPadTemplate *pad_template;
|
||||
|
||||
gst_element_class_set_details(element_class, &gst_vaapisink_details);
|
||||
|
||||
gst_element_class_add_pad_template(
|
||||
element_class,
|
||||
gst_static_pad_template_get(&gst_vaapisink_sink_factory)
|
||||
);
|
||||
pad_template = gst_static_pad_template_get(&gst_vaapisink_sink_factory);
|
||||
gst_element_class_add_pad_template(element_class, pad_template);
|
||||
gst_object_unref(pad_template);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -211,20 +211,19 @@ static void
|
|||
gst_vaapiupload_base_init(gpointer klass)
|
||||
{
|
||||
GstElementClass * const element_class = GST_ELEMENT_CLASS(klass);
|
||||
GstPadTemplate *pad_template;
|
||||
|
||||
gst_element_class_set_details(element_class, &gst_vaapiupload_details);
|
||||
|
||||
/* sink pad */
|
||||
gst_element_class_add_pad_template(
|
||||
element_class,
|
||||
gst_static_pad_template_get(&gst_vaapiupload_sink_factory)
|
||||
);
|
||||
pad_template = gst_static_pad_template_get(&gst_vaapiupload_sink_factory);
|
||||
gst_element_class_add_pad_template(element_class, pad_template);
|
||||
gst_object_unref(pad_template);
|
||||
|
||||
/* src pad */
|
||||
gst_element_class_add_pad_template(
|
||||
element_class,
|
||||
gst_static_pad_template_get(&gst_vaapiupload_src_factory)
|
||||
);
|
||||
pad_template = gst_static_pad_template_get(&gst_vaapiupload_src_factory);
|
||||
gst_element_class_add_pad_template(element_class, pad_template);
|
||||
gst_object_unref(pad_template);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue