summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-08 19:43:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-08 19:43:10 +0200
commitf3bacced244b90975ceb6e7c283413d34761e26c (patch)
tree6938a85d1afd2f2fea01ec7a4b67c129c6f1c379 /ffmpeg.c
parentdc46692ded751b075abd6d0187519f3d80eab6d1 (diff)
downloadffmpeg-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 5e9fcf197c..b290022d02 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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');