You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
ffmpeg: avoid a confusing and easy to break if().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
bb32124577
commit
93147daf59
5
ffmpeg.c
5
ffmpeg.c
@@ -1217,10 +1217,11 @@ static void term_init(void)
|
||||
#if HAVE_TERMIOS_H
|
||||
if(!run_as_daemon){
|
||||
struct termios tty;
|
||||
int istty = 1;
|
||||
#if HAVE_ISATTY
|
||||
if(isatty(0) && isatty(2))
|
||||
istty = isatty(0) && isatty(2);
|
||||
#endif
|
||||
if (tcgetattr (0, &tty) == 0) {
|
||||
if (istty && tcgetattr (0, &tty) == 0) {
|
||||
oldtty = tty;
|
||||
restore_tty = 1;
|
||||
atexit(term_exit);
|
||||
|
Reference in New Issue
Block a user