Delay killing ffmpeg on output stream close event