summaryrefslogtreecommitdiffstats
path: root/plugins/ufo/uca-ufo-camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ufo/uca-ufo-camera.c')
-rw-r--r--plugins/ufo/uca-ufo-camera.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/ufo/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c
index d7a5894..4f9a15c 100644
--- a/plugins/ufo/uca-ufo-camera.c
+++ b/plugins/ufo/uca-ufo-camera.c
@@ -331,10 +331,13 @@ uca_ufo_camera_start_recording(UcaCamera *camera, GError **error)
}
static void
-uca_ufo_camera_stop_recording(UcaCamera *camera, GError **error)
+uca_ufo_camera_stop_recording (UcaCamera *camera, GError **error)
{
UcaUfoCameraPrivate *priv;
UcaCameraTriggerSource trigger_source;
+ pcilib_event_id_t event_id;
+ pcilib_event_info_t event_info;
+
g_return_if_fail(UCA_IS_UFO_CAMERA(camera));
priv = UCA_UFO_CAMERA_GET_PRIVATE(camera);
@@ -350,6 +353,10 @@ uca_ufo_camera_stop_recording(UcaCamera *camera, GError **error)
g_thread_join(priv->async_thread);
priv->async_thread = NULL;
}
+
+ /* read stale frames ... */
+ while (!pcilib_get_next_event (priv->handle, priv->timeout, &event_id, sizeof (pcilib_event_info_t), &event_info))
+ ;
}
static void