Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-06-06 14:39:07 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-06-06 19:13:28 +0400
commit93147daf59b096f3d6ad6d9e8d8c11c293e425d2 (patch)
tree9993a2b9987cda1b4ff6631fb17aab2bbdb726c3 /ffmpeg.c
parentbb321245777a89426aa2131887497bd5eead1d2e (diff)
ffmpeg: avoid a confusing and easy to break if().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 914bc6adb4..3d6853fb62 100644
--- a/ffmpeg.c
+++ b/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);