[FFmpeg-cvslog] r18038 - trunk/ffmpeg.c
stefano
subversion
Wed Mar 18 22:38:42 CET 2009
Author: stefano
Date: Wed Mar 18 22:38:41 2009
New Revision: 18038
Log:
Use read_yesno() in opt_output_file().
Modified:
trunk/ffmpeg.c
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c Wed Mar 18 22:35:49 2009 (r18037)
+++ trunk/ffmpeg.c Wed Mar 18 22:38:41 2009 (r18038)
@@ -3394,18 +3394,13 @@ static void opt_output_file(const char *
filename[1] == ':' ||
av_strstart(filename, "file:", NULL))) {
if (url_exist(filename)) {
- int c;
-
if (!using_stdin) {
fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
fflush(stderr);
- c = getchar();
- if (toupper(c) != 'Y') {
+ if (!read_yesno()) {
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);
More information about the ffmpeg-cvslog
mailing list