From 3ae98497c2fc6409828cdd1f2fad9ab244505581 Mon Sep 17 00:00:00 2001 From: Ganesh Ajjanagadde Date: Fri, 31 Jul 2015 08:36:27 -0400 Subject: [PATCH] ffmpeg: modify tty state when stderr is redirected Removes unnecessary isatty(), fixes Ticket2964 Signed-off-by: Ganesh Ajjanagadde Signed-off-by: Ronald S. Bultje --- ffmpeg.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 85cc6e4807..13405e309e 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -32,14 +32,12 @@ #include #include -#if HAVE_ISATTY #if HAVE_IO_H #include #endif #if HAVE_UNISTD_H #include #endif -#endif #include "libavformat/avformat.h" #include "libavdevice/avdevice.h" @@ -370,11 +368,7 @@ void term_init(void) #if HAVE_TERMIOS_H if(!run_as_daemon){ struct termios tty; - int istty = 1; -#if HAVE_ISATTY - istty = isatty(0) && isatty(2); -#endif - if (istty && tcgetattr (0, &tty) == 0) { + if (tcgetattr (0, &tty) == 0) { oldtty = tty; restore_tty = 1; -- 2.11.0