summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-03-18 21:34:19 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-03-18 21:34:19 +0000
commiteab5168cd345a5ce0001036690daac7767062aa1 (patch)
treea3c7f3f974ddd4b2a5bb8bfb4e31a2d8f4ca1669
parent1e896640c401cff430c6b11e203b23d6c0b2c635 (diff)
downloadffmpeg-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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 57770e6..c4f910d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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);
OpenPOWER on IntegriCloud