Attempt to reduce leak of ffmpeg previews

This commit is contained in:
Leo Vasanko 2023-11-21 04:01:51 -08:00
parent c3d6aecffd
commit 27422ae1e2

View File

@ -113,6 +113,8 @@ def process_video(path, *, maxsize, quality):
if rotation:
img = img.rotate(rotation, expand=True)
img.save(imgdata, format="webp", quality=quality, method=4)
del img
ret = imgdata.getvalue()
gc.collect()
return ret