restore old tty in ffmpeg patch by (Roumen Petrov <ffmpeg at roumenpetrov dot info>)