Attempt to reduce leak of ffmpeg previews
This commit is contained in:
parent
02c5e484b5
commit
8437c1f60e
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
import gc
|
||||
import io
|
||||
import mimetypes
|
||||
import urllib.parse
|
||||
|
@ -109,5 +110,7 @@ def process_video(path, *, maxsize, quality):
|
|||
img = img.rotate(rot, expand=True)
|
||||
img.save(imgdata, format="webp", quality=quality, method=4)
|
||||
del img
|
||||
|
||||
return imgdata.getvalue()
|
||||
ret = imgdata.getvalue()
|
||||
del imgdata
|
||||
gc.collect()
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue
Block a user