[FFmpeg-devel] [PATCH 1/1] fftools/ffmpeg_opt: Exit with non-zero status when destination exists

Dabrien 'Dabe' Murphy dabe at dabe.com
Mon Jul 15 15:56:22 EEST 2024


---
  fftools/ffmpeg_opt.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 2c201c74b2..dddf7c6475 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -604,13 +604,13 @@ int assert_file_overwrite(const char *filename)
                  signal(SIGINT, SIG_DFL);
                  if (!read_yesno()) {
                      av_log(NULL, AV_LOG_FATAL, "Not overwriting - exiting\n");
-                    return AVERROR_EXIT;
+                    return AVERROR(EEXIST);
                  }
                  term_init();
              }
              else {
                  av_log(NULL, AV_LOG_FATAL, "File '%s' already exists. Exiting.\n", filename);
-                return AVERROR_EXIT;
+                return AVERROR(EEXIST);
              }
          }
      }
-- 2.45.2



More information about the ffmpeg-devel mailing list