Commit f3bacced authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: fix read_yn() if HAVE_TERMIOS_H || HAVE_KBHIT == 0

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent dc46692d
...@@ -611,11 +611,13 @@ static int read_key(void) ...@@ -611,11 +611,13 @@ static int read_key(void)
static int read_yn(void) static int read_yn(void)
{ {
int c; int c, t;
#if HAVE_TERMIOS_H || HAVE_KBHIT #if HAVE_TERMIOS_H || HAVE_KBHIT
while((c=read_key()) < 0); while((c=read_key()) < 0);
#else #else
c= getchar(); t=c= getchar();
while (t != '\n' && t != EOF)
t = getchar();
#endif #endif
return (toupper(c) == 'Y'); return (toupper(c) == 'Y');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment