From 0ba932d37d5af2cb5eb2ae99b774eda95b2a6e76 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 5 Feb 2018 16:37:07 -0500 Subject: [PATCH] BF: AudioStim.close to not breed ffmpeg processes by moviepy --- pliers/stimuli/audio.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pliers/stimuli/audio.py b/pliers/stimuli/audio.py index dce2b49b2..29eb94cd3 100644 --- a/pliers/stimuli/audio.py +++ b/pliers/stimuli/audio.py @@ -110,3 +110,8 @@ def save(self, path): path (str): Filename to save audio data to. ''' self.clip.write_audiofile(path, fps=self.sampling_rate) + + def close(self): + if self.clip: + self.clip.close() + self.clip = None