diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index a2d2f940f5..57e9a0e3b2 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -460,8 +460,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; }