summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2012-07-28 18:04:57 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2012-07-28 18:27:19 -0300
commit3ce5a977ad614f5561e3fb37a77bc470518832b0 (patch)
tree4fa9e8d43d4475c365ba299ff88b57990d1020c9 /gst/camerabin2
parent5d890b3c92714e1f37163290c32911bcd7818a57 (diff)
downloadgstreamer-plugins-bad-3ce5a977ad614f5561e3fb37a77bc470518832b0.tar.gz
camerabin: Fix references to avoid element leaking
Some pad probes are never going to be removed from the pads, so we shouldn't keep a camerabin reference with them or camerabin will never get released
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstcamerabin2.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index b2211b09d..f0ca68ae4 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -1638,8 +1638,7 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
srcpad = gst_element_get_static_pad (camera->image_encodebin, "src");
gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
- gst_camera_bin_image_sink_event_probe, gst_object_ref (camera),
- gst_object_unref);
+ gst_camera_bin_image_sink_event_probe, camera, NULL);
gst_object_unref (srcpad);
}
@@ -1768,8 +1767,7 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
}
gst_pad_add_probe (imgsrc, GST_PAD_PROBE_TYPE_BUFFER,
- gst_camera_bin_image_src_buffer_probe, gst_object_ref (camera),
- gst_object_unref);
+ gst_camera_bin_image_src_buffer_probe, camera, NULL);
gst_object_unref (imgsrc);
}
@@ -1834,8 +1832,7 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
/* drop EOS for audiosrc elements that push them on state_changes
* (basesrc does this) */
gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
- gst_camera_bin_audio_src_data_probe, gst_object_ref (camera),
- gst_object_unref);
+ gst_camera_bin_audio_src_data_probe, camera, NULL);
gst_object_unref (srcpad);
}