aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoder.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/decoder.py b/decoder.py
index 5b3178c..8166382 100644
--- a/decoder.py
+++ b/decoder.py
@@ -48,7 +48,6 @@ if isinstance(args.input, str) and args.input.isdecimal():
cap = cv2.VideoCapture(args.input)
data = None
start_time = 0
-status = 0
decoded = 0
while data is None:
try:
@@ -56,10 +55,6 @@ while data is None:
if not ret:
print("End of stream")
break
- if isinstance(args.input, int) and (status == 1 or (status == 0 and np.random.rand() < 0.5)):
- status = 2
- print("Skipped")
- continue
# raw_frame is a uint8 BE CAREFUL
cv2.imshow("", raw_frame)
cv2.waitKey(1)
@@ -113,14 +108,12 @@ while data is None:
frame[:reshape_len] = np.ravel(frame[:reshape_len].reshape(255, reshape_len // 255), "F")
data = decoder.decode(bytes(rsc.decode(bytearray(frame ^ frame_xor))[0][: args.psize]))
decoded += 1
- status = 1
if start_time == 0:
start_time = time.time()
print("Decoded frame")
except KeyboardInterrupt:
break
except Exception as e:
- status = 0
print(e)
cap.release()
print(decoded)