diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index b07c086aa2..351e7f684a 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -443,8 +443,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; }