Fixed a small bug

This commit is contained in:
Emiliana 2020-07-02 02:07:54 +02:00
parent 5c4d4b7b14
commit 6ccb821508
2 changed files with 3 additions and 2 deletions

View file

@ -72,7 +72,8 @@ if args.faces >= 40:
fps = 0
if os.name == 'nt':
fps = args.fps
input_reader = InputReader(args.capture, args.raw_rgb, args.width, args.height, fps, use_escapi=True if args.use_escapi == 1 else False)
use_escapi_flag = True if args.use_escapi == 1 else False
input_reader = InputReader(args.capture, args.raw_rgb, args.width, args.height, fps, use_escapi=use_escapi_flag)
else:
input_reader = InputReader(args.capture, args.raw_rgb, args.width, args.height, fps, use_escapi=False)
if type(input_reader.reader) == VideoReader:

View file

@ -96,7 +96,7 @@ class InputReader():
elif os.path.exists(capture):
self.reader = VideoReader(capture)
elif capture == str(int(capture)):
self.reader = CameraReader(int(capture), width, height, fps)
self.reader = CameraReader(int(capture), width, height, fps, use_escapi=use_escapi)
except Exception as e:
print("Error: " + str(e))