Fixed a bug where the ffmpeg process would not exit.