mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
ffmpeg: fix read_yn() if HAVE_TERMIOS_H || HAVE_KBHIT == 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
6
ffmpeg.c
6
ffmpeg.c
@ -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');
|
||||||
|
Reference in New Issue
Block a user