summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-03-06 22:36:19 +0000
committerJan Schmidt <thaytan@noraisin.net>2009-03-07 00:31:07 +0000
commit81a950ddf8e88b4bfe674f2bdd2184d1f5819561 (patch)
treebc670fa5a3cb74aef91f222312b349e3097802fc /gst
parent14a881ac0595c2f812b09da5cde4a7c5487edef0 (diff)
downloadgst-plugins-bad-81a950ddf8e88b4bfe674f2bdd2184d1f5819561.tar.gz
gst-plugins-bad-81a950ddf8e88b4bfe674f2bdd2184d1f5819561.tar.bz2
gst-plugins-bad-81a950ddf8e88b4bfe674f2bdd2184d1f5819561.zip
camerabin: Make the tests pass when the camerabin can't initialise.
The camerabin tests were throwing glib errors and hanging when gst-plugins-good elements (jpegenc, videocrop) can't found.
Diffstat (limited to 'gst')
-rw-r--r--gst/camerabin/gstcamerabin.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c
index 905a8c9c..bdc4f28b 100644
--- a/gst/camerabin/gstcamerabin.c
+++ b/gst/camerabin/gstcamerabin.c
@@ -2750,13 +2750,15 @@ gst_camerabin_user_start (GstCameraBin * camera)
}
g_mutex_unlock (camera->capture_mutex);
- g_object_set (G_OBJECT (camera->active_bin), "filename",
- camera->filename->str, NULL);
+ if (camera->active_bin) {
+ g_object_set (G_OBJECT (camera->active_bin), "filename",
+ camera->filename->str, NULL);
- if (camera->active_bin == camera->imgbin) {
- gst_camerabin_start_image_capture (camera);
- } else if (camera->active_bin == camera->vidbin) {
- gst_camerabin_start_video_recording (camera);
+ if (camera->active_bin == camera->imgbin) {
+ gst_camerabin_start_image_capture (camera);
+ } else if (camera->active_bin == camera->vidbin) {
+ gst_camerabin_start_video_recording (camera);
+ }
}
}