diff mbox series

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

Message ID 20210727144813.452917-7-george@nsup.org
State New
Headers show
Series [FFmpeg-devel,01/10] lavu/internal: add hex to int functions. | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Nicolas George July 27, 2021, 2:48 p.m. UTC
Signed-off-by: Nicolas George <george@nsup.org>
---
 fftools/ffmpeg_opt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

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)