]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg_opt.c
avcodec/snow: split block clipping checks
[ffmpeg] / ffmpeg_opt.c
index 4e0dc478e6c37a660694b27b866675b0be9e095c..26798f712ba37b469e60159244a4ab6d5f420432 100644 (file)
@@ -697,10 +697,9 @@ static void assert_file_overwrite(const char *filename)
         exit_program(1);
     }
 
-    if (!file_overwrite &&
-        (strchr(filename, ':') == NULL || filename[1] == ':' ||
-         av_strstart(filename, "file:", NULL))) {
-        if (avio_check(filename, 0) == 0) {
+    if (!file_overwrite) {
+        const char *proto_name = avio_find_protocol_name(filename);
+        if (proto_name && !strcmp(proto_name, "file") && avio_check(filename, 0) == 0) {
             if (stdin_interaction && !no_file_overwrite) {
                 fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
                 fflush(stderr);