Commit 421b117a authored by stefano's avatar stefano

Use read_yesno() in opt_output_file().


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18038 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ba515ddf
......@@ -3394,18 +3394,13 @@ static void opt_output_file(const char *filename)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment