[FFmpeg-devel] [PATCH 06/10] fftools/ffmpeg_opt: treat fs: the same way as file:.

Nicolas George george at nsup.org
Tue Jul 27 17:48:09 EEST 2021


Signed-off-by: Nicolas George <george at nsup.org>
---
 fftools/ffmpeg_opt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 1b43bab9fc..23b4e981c7 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1004,7 +1004,9 @@ static void assert_file_overwrite(const char *filename)
     }
 
     if (!file_overwrite) {
-        if (proto_name && !strcmp(proto_name, "file") && avio_check(filename, 0) == 0) {
+        if (proto_name &&
+            !(strcmp(proto_name, "file") && strcmp(proto_name, "fs")) &&
+            avio_check(filename, 0) == 0) {
             if (stdin_interaction && !no_file_overwrite) {
                 fprintf(stderr,"File '%s' already exists. Overwrite? [y/N] ", filename);
                 fflush(stderr);
@@ -1023,7 +1025,7 @@ static void assert_file_overwrite(const char *filename)
         }
     }
 
-    if (proto_name && !strcmp(proto_name, "file")) {
+    if (proto_name && !(strcmp(proto_name, "file") && strcmp(proto_name, "fs"))) {
         for (int i = 0; i < nb_input_files; i++) {
              InputFile *file = input_files[i];
              if (file->ctx->iformat->flags & AVFMT_NOFILE)
-- 
2.30.2



More information about the ffmpeg-devel mailing list