diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 88ce3007e8..8674c4d250 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -285,8 +285,9 @@ static int read_key(void) } //Read it if(nchars != 0) { - read(0, &ch, 1); - return ch; + if (read(0, &ch, 1) == 1) + return ch; + return 0; }else{ return -1; }