diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-07-31 08:36:27 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2015-10-11 17:41:15 -0400 |
commit | 3ae98497c2fc6409828cdd1f2fad9ab244505581 (patch) | |
tree | db59f52d4e19ca7f6ca8ad75139b485c71ce308b /ffmpeg.c | |
parent | 323d37521d66233c8d9405dba902100ef146b5ec (diff) | |
download | ffmpeg-3ae98497c2fc6409828cdd1f2fad9ab244505581.tar.gz |
ffmpeg: modify tty state when stderr is redirected
Removes unnecessary isatty(), fixes Ticket2964
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -32,14 +32,12 @@ #include <limits.h> #include <stdint.h> -#if HAVE_ISATTY #if HAVE_IO_H #include <io.h> #endif #if HAVE_UNISTD_H #include <unistd.h> #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; |