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-07 02:55:26 +0400
commit565581b0a4e89e2633bef868d9db52bd999122d0 (patch)
tree42b40c961c6562640feff3af38b9b6d340b24508
parentdc85ca0945c902695815fe9a32aeb383236a19b6 (diff)
ffmpeg: avoid a confusing and easy to break if().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 93147daf59b096f3d6ad6d9e8d8c11c293e425d2) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 99ecb7830e..6b204a176f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1456,10 +1456,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);