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