diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-03-18 21:34:19 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-03-18 21:34:19 +0000 |
commit | eab5168cd345a5ce0001036690daac7767062aa1 (patch) | |
tree | a3c7f3f974ddd4b2a5bb8bfb4e31a2d8f4ca1669 | |
parent | 1e896640c401cff430c6b11e203b23d6c0b2c635 (diff) | |
download | ffmpeg-streaming-eab5168cd345a5ce0001036690daac7767062aa1.zip ffmpeg-streaming-eab5168cd345a5ce0001036690daac7767062aa1.tar.gz |
Flush the remaning chars in the input buffer after reading the
response to the "Overwrite ? [y/N]" question.
Fix the behaviour when the question is asked more than one time.
Originally committed as revision 18036 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | ffmpeg.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3404,6 +3404,8 @@ static void opt_output_file(const char *filename) fprintf(stderr, "Not overwriting - exiting\n"); av_exit(1); } + while (c != '\n' && c != EOF) + c = getchar(); } else { fprintf(stderr,"File '%s' already exists. Exiting.\n", filename); |