Merge pull request #188 from wouter-heerwegh/reduce_h264_artifacts

Move lock above initialization of self.frame
This commit is contained in:
Jakob Löw
2023-05-31 17:39:15 +02:00
committed by GitHub

View File

@@ -1032,9 +1032,9 @@ class BackgroundFrameRead:
def __init__(self, tello, address, with_queue = False, maxsize = 32):
self.address = address
self.lock = Lock()
self.frame = np.zeros([300, 400, 3], dtype=np.uint8)
self.frames = deque([], maxsize)
self.lock = Lock()
self.with_queue = with_queue
# Try grabbing frame with PyAV