def close(self):
        """Closes the writer, terminating the subprocess if is still alive."""
        if self.proc:
            self.proc.stdin.close()
            if self.proc.stderr is not None:
                self.proc.stderr.close()
            self.proc.wait()

            self.proc = None
Closes the writer, terminating the subprocess if is still alive.
moviepy/video/io/ffplay_previewer.py