mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Use read_yesno() in opt_output_file().
Originally committed as revision 18038 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
090b61b2d1
commit
29c6638668
7
ffmpeg.c
7
ffmpeg.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user