summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/uca-camera.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c
index d06a570..f517d87 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -211,9 +211,12 @@ void uca_camera_start_recording(UcaCamera *camera, GError **error)
return;
}
- camera->priv->recording = TRUE;
(*klass->start_recording)(camera, error);
- g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+
+ if (error == NULL) {
+ camera->priv->recording = TRUE;
+ g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+ }
}
void uca_camera_stop_recording(UcaCamera *camera, GError **error)
@@ -231,9 +234,12 @@ void uca_camera_stop_recording(UcaCamera *camera, GError **error)
return;
}
- camera->priv->recording = FALSE;
(*klass->stop_recording)(camera, error);
- g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+
+ if (error == NULL) {
+ camera->priv->recording = FALSE;
+ g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+ }
}
void uca_camera_set_grab_func(UcaCamera *camera, UcaCameraGrabFunc func)