Skip to content

Commit

Permalink
fix to terminate the process which has been killed
Browse files Browse the repository at this point in the history
  • Loading branch information
luyanger1799 committed Aug 12, 2020
1 parent 69a3a9f commit 1c555ab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions moviepy/audio/io/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,11 @@ def buffer_around(self, framenumber):

def close(self):
if self.proc:
self.proc.terminate()
self.proc.stdout.close()
self.proc.stderr.close()
self.proc.wait()
if self.proc.poll() is None:
self.proc.terminate()
self.proc.stdout.close()
self.proc.stderr.close()
self.proc.wait()
self.proc = None

def __del__(self):
Expand Down

0 comments on commit 1c555ab

Please sign in to comment.