diff options
author | Thiago Santos <ts.santos@osg.sisa.samsung.com> | 2014-07-26 13:27:51 -0300 |
---|---|---|
committer | Thiago Santos <ts.santos@osg.sisa.samsung.com> | 2014-07-26 13:27:51 -0300 |
commit | a70764df5a93dfab9bd5c07d1dd146a23e41c0dd (patch) | |
tree | 97a7df4bc95368781c12e82126a50d615b577404 /gst/camerabin2 | |
parent | 455baef44845ada0b28d87744dd092cfaaff1c94 (diff) | |
download | gstreamer-plugins-bad-a70764df5a93dfab9bd5c07d1dd146a23e41c0dd.tar.gz |
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
Diffstat (limited to 'gst/camerabin2')
-rw-r--r-- | gst/camerabin2/gstwrappercamerabinsrc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c index d237d279f..187899b68 100644 --- a/gst/camerabin2/gstwrappercamerabinsrc.c +++ b/gst/camerabin2/gstwrappercamerabinsrc.c @@ -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), |