summaryrefslogtreecommitdiff
path: root/thread_kinect.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_kinect.c')
-rw-r--r--thread_kinect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/thread_kinect.c b/thread_kinect.c
index f3b5a78..fdd7f25 100644
--- a/thread_kinect.c
+++ b/thread_kinect.c
@@ -1,8 +1,9 @@
#include <error.h>
#include <libfreenect/libfreenect.h>
#include <libusb-1.0/libusb.h>
-#include <stdio.h>
#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
#include "main.h"
@@ -114,8 +115,7 @@ void thread_kinect(int video_fd, int depth_fd, int accel_fd) {
end:
freenect_shutdown(ctx);
-
- if (depth_stream) fclose(depth_stream);
- if (video_stream) fclose(video_stream);
- if (accel_stream) fclose(accel_stream);
+ close(video_fd);
+ close(depth_fd);
+ close(accel_fd);
}