diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-03-18 21:38:41 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-03-18 21:38:41 +0000 |
commit | 29c663866823f716284bf98641e50aaed758b9f2 (patch) | |
tree | 6a00e6e2ca89523baa5f2300042bfdb09a901a06 /ffmpeg.c | |
parent | 090b61b2d18a034c225598d54304e05c95b71b3e (diff) | |
download | ffmpeg-29c663866823f716284bf98641e50aaed758b9f2.tar.gz |
Use read_yesno() in opt_output_file().
Originally committed as revision 18038 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -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); |