diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index d4e5f978f1..4a0c7d5c4d 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -306,8 +306,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; }