wrappercamerabinsrc: do not give references to probes

They are kept until the probes are removed but they will never be
removed as the refcount of the element won't get to 0 because the
probes own references (cyclic refs). As the probes should only be
running as long as the element is running there is no need to
secure a ref for them.

Removes 3 leaked refs of wrappercamerabinsrc
This commit is contained in:
Thiago Santos 2014-07-26 13:27:51 -03:00
parent 455baef448
commit a70764df5a

View file

@ -508,8 +508,7 @@ check_and_replace_src (GstWrapperCameraBinSrc * self)
self->src_event_probe_id =
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
gst_wrapper_camera_src_src_event_probe, gst_object_ref (self),
gst_object_unref);
gst_wrapper_camera_src_src_event_probe, self, NULL);
gst_object_unref (pad);
}
return TRUE;
@ -628,11 +627,9 @@ gst_wrapper_camera_bin_src_construct_pipeline (GstBaseCameraSrc * bcamsrc)
g_assert (self->outsel_imgpad != NULL);
gst_pad_add_probe (self->outsel_imgpad, GST_PAD_PROBE_TYPE_BUFFER,
gst_wrapper_camera_bin_src_imgsrc_probe, gst_object_ref (self),
gst_object_unref);
gst_wrapper_camera_bin_src_imgsrc_probe, self, NULL);
gst_pad_add_probe (self->outsel_vidpad, GST_PAD_PROBE_TYPE_BUFFER,
gst_wrapper_camera_bin_src_vidsrc_probe, gst_object_ref (self),
gst_object_unref);
gst_wrapper_camera_bin_src_vidsrc_probe, self, NULL);
gst_ghost_pad_set_target (GST_GHOST_PAD (self->imgsrc),
self->outsel_imgpad);
gst_ghost_pad_set_target (GST_GHOST_PAD (self->vidsrc),