if (self->video_block_pad) {
self->video_block_id =
gst_pad_add_probe (self->video_block_pad, GST_PROBE_TYPE_BLOCK,
- _pad_blocked_cb, gst_object_ref (self),
- (GDestroyNotify) gst_object_unref);
+ _pad_blocked_cb, self, NULL);
}
}
if (self->subtitle_block_pad) {
self->subtitle_block_id =
gst_pad_add_probe (self->subtitle_block_pad, GST_PROBE_TYPE_BLOCK,
- _pad_blocked_cb, gst_object_ref (self),
- (GDestroyNotify) gst_object_unref);
+ _pad_blocked_cb, self, NULL);
}
}
/* Unblock pads */
unblock_video (self);
unblock_subtitle (self);
-
goto out;
} else if (target) {
gst_object_unref (target);
templ = gst_static_pad_template_get (&srctemplate);
self->srcpad = gst_ghost_pad_new_no_target_from_template ("src", templ);
+ gst_object_unref (templ);
proxypad =
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (self->srcpad)));
templ = gst_static_pad_template_get (&video_sinktemplate);
self->video_sinkpad =
gst_ghost_pad_new_no_target_from_template ("video_sink", templ);
+ gst_object_unref (templ);
gst_pad_set_event_function (self->video_sinkpad,
GST_DEBUG_FUNCPTR (gst_subtitle_overlay_video_sink_event));
gst_pad_set_chain_function (self->video_sinkpad,
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD
(self->video_sinkpad)));
self->video_block_pad = proxypad;
-
+ gst_object_unref (proxypad);
gst_element_add_pad (GST_ELEMENT_CAST (self), self->video_sinkpad);
templ = gst_static_pad_template_get (&subtitle_sinktemplate);
self->subtitle_sinkpad =
gst_ghost_pad_new_no_target_from_template ("subtitle_sink", templ);
+ gst_object_unref (templ);
gst_pad_set_link_function (self->subtitle_sinkpad,
GST_DEBUG_FUNCPTR (gst_subtitle_overlay_subtitle_sink_link));
gst_pad_set_unlink_function (self->subtitle_sinkpad,
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD
(self->subtitle_sinkpad)));
self->subtitle_block_pad = proxypad;
+ gst_object_unref (proxypad);
gst_element_add_pad (GST_ELEMENT_CAST (self), self->subtitle_sinkpad);