fix messed up cut/paste in thirdparty/Makefile / last checkin
[goodguy/history.git] / cinelerra-5.1 / cinelerra / devicev4l2base.C
index efc3c0616fdd7ceac574369f5242aa050098fa88..f566e5028e9f5c9149168a50cddc7aceed610bf4 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 
+#ifdef HAVE_VIDEO4LINUX2
 
 #include "bctimer.h"
 #include "channel.h"
@@ -41,9 +42,7 @@
 #include <errno.h>
 #include <fcntl.h>
 
-#ifdef HAVE_VIDEO4LINUX2
 #include <linux/videodev2.h>
-#endif
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 
@@ -165,8 +164,8 @@ DeviceV4L2Put::~DeviceV4L2Put()
                done = 1;
                buffer_lock->unlock();
                Thread::cancel();
-               Thread::join();
        }
+       Thread::join();
        delete buffer_lock;
        delete putq;
 }
@@ -709,8 +708,8 @@ void DeviceV4L2Base::close_dev()
                {
                        done = 1;
                        Thread::cancel();
-                       Thread::join();
                }
+               Thread::join();
                if(put_thread)
                {
                        delete put_thread;
@@ -949,3 +948,4 @@ void DeviceV4L2Base::run()
        }
 }
 
+#endif