Commit c8a11014 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: use isatty() before messing with the terminal state

This fixes terminal messup in case of crashes (like in make fate)
Reviewed-by: 's avatarFrançois Revol <revol@free.fr>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ad60b3b1
......@@ -1217,7 +1217,9 @@ static void term_init(void)
#if HAVE_TERMIOS_H
if(!run_as_daemon){
struct termios tty;
#if HAVE_ISATTY
if(isatty(0) && isatty(2))
#endif
if (tcgetattr (0, &tty) == 0) {
oldtty = tty;
restore_tty = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment