diff options
-rw-r--r-- | gst/camerabin/camerabinvideo.c | 4 | ||||
-rw-r--r-- | gst/camerabin/gstcamerabin.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gst/camerabin/camerabinvideo.c b/gst/camerabin/camerabinvideo.c index 2569772a..965e41e1 100644 --- a/gst/camerabin/camerabinvideo.c +++ b/gst/camerabin/camerabinvideo.c @@ -549,6 +549,7 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) vid_sinkpad = gst_element_get_static_pad (vid->tee, "sink"); } gst_ghost_pad_set_target (GST_GHOST_PAD (vid->sinkpad), vid_sinkpad); + gst_object_unref (vid_sinkpad); /* Add queue element for video */ @@ -668,6 +669,7 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) /* Never let video bin eos events reach view finder */ gst_pad_add_event_probe (vid_srcpad, G_CALLBACK (gst_camerabin_drop_eos_probe), vid); + gst_object_unref (vid_srcpad); pad = gst_element_get_static_pad (vid->aud_src, "src"); gst_pad_add_buffer_probe (pad, @@ -702,10 +704,12 @@ gst_camerabin_video_destroy_elements (GstCameraBinVideo * vid) /* Release tee request pads */ if (vid->tee_video_srcpad) { gst_element_release_request_pad (vid->tee, vid->tee_video_srcpad); + gst_object_unref (vid->tee_video_srcpad); vid->tee_video_srcpad = NULL; } if (vid->tee_vf_srcpad) { gst_element_release_request_pad (vid->tee, vid->tee_vf_srcpad); + gst_object_unref (vid->tee_vf_srcpad); vid->tee_vf_srcpad = NULL; } diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 0a110f50..3f879876 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -805,22 +805,27 @@ camerabin_destroy_elements (GstCameraBin * camera) /* Release request pads */ if (camera->pad_view_vid) { gst_element_release_request_pad (camera->view_in_sel, camera->pad_view_vid); + gst_object_unref (camera->pad_view_vid); camera->pad_view_vid = NULL; } if (camera->pad_src_vid) { gst_element_release_request_pad (camera->src_out_sel, camera->pad_src_vid); + gst_object_unref (camera->pad_src_vid); camera->pad_src_vid = NULL; } if (camera->pad_src_img) { gst_element_release_request_pad (camera->src_out_sel, camera->pad_src_img); + gst_object_unref (camera->pad_src_img); camera->pad_src_img = NULL; } if (camera->pad_view_src) { gst_element_release_request_pad (camera->view_in_sel, camera->pad_view_src); + /* don't unref, we have not requested it */ camera->pad_view_src = NULL; } if (camera->pad_src_view) { gst_element_release_request_pad (camera->src_out_sel, camera->pad_src_view); + gst_object_unref (camera->pad_src_view); camera->pad_src_view = NULL; } |