compatibility corrections
authorAlexander Mordvintsev <no@email>
Mon, 28 May 2012 09:25:08 +0000 (09:25 +0000)
committerAlexander Mordvintsev <no@email>
Mon, 28 May 2012 09:25:08 +0000 (09:25 +0000)
samples/python2/video_threaded.py

index 6f92d06..bf15da1 100644 (file)
@@ -75,8 +75,9 @@ if __name__ == '__main__':
             else:\r
                 task = DummyTask(process_frame(frame, t))\r
             pending.append(task)\r
-        ch = cv2.waitKey(1)\r
+        ch = 0xFF & cv2.waitKey(1)\r
         if ch == ord(' '):\r
             threaded_mode = not threaded_mode\r
         if ch == 27:\r
             break\r
+cv2.destroyAllWindows()\r