Commit 93147daf authored by Reimar Döffinger's avatar Reimar Döffinger Committed by Michael Niedermayer

ffmpeg: avoid a confusing and easy to break if().

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bb321245
...@@ -1217,10 +1217,11 @@ static void term_init(void) ...@@ -1217,10 +1217,11 @@ static void term_init(void)
#if HAVE_TERMIOS_H #if HAVE_TERMIOS_H
if(!run_as_daemon){ if(!run_as_daemon){
struct termios tty; struct termios tty;
int istty = 1;
#if HAVE_ISATTY #if HAVE_ISATTY
if(isatty(0) && isatty(2)) istty = isatty(0) && isatty(2);
#endif #endif
if (tcgetattr (0, &tty) == 0) { if (istty && tcgetattr (0, &tty) == 0) {
oldtty = tty; oldtty = tty;
restore_tty = 1; restore_tty = 1;
atexit(term_exit); atexit(term_exit);
......
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