mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-28 06:59:11 +00:00
remove encoded images from memory to prevent exhaustion
This commit is contained in:
parent
0d0fd70a24
commit
6378a36d91
@ -133,8 +133,12 @@ class VideoEncoder(threading.Thread):
|
||||
time.sleep(0.1)
|
||||
continue
|
||||
|
||||
# send the image to FFmpeg for encoding
|
||||
self.encoder.stdin.write(image.tobytes())
|
||||
|
||||
# remove the image from memory
|
||||
self.processed_frames[frame_index] = None
|
||||
|
||||
with self.processed.get_lock():
|
||||
self.processed.value += 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user