diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-08 19:43:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-08 19:43:10 +0200 |
commit | f3bacced244b90975ceb6e7c283413d34761e26c (patch) | |
tree | 6938a85d1afd2f2fea01ec7a4b67c129c6f1c379 /ffmpeg.c | |
parent | dc46692ded751b075abd6d0187519f3d80eab6d1 (diff) | |
download | ffmpeg-f3bacced244b90975ceb6e7c283413d34761e26c.tar.gz |
ffmpeg: fix read_yn() if HAVE_TERMIOS_H || HAVE_KBHIT == 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -611,11 +611,13 @@ static int read_key(void) static int read_yn(void) { - int c; + int c, t; #if HAVE_TERMIOS_H || HAVE_KBHIT while((c=read_key()) < 0); #else - c= getchar(); + t=c= getchar(); + while (t != '\n' && t != EOF) + t = getchar(); #endif return (toupper(c) == 'Y'); |