--- libavformat/file.c.orig	2024-04-05 01:23:00.000000000 +0200
+++ libavformat/file.c	2024-05-31 20:43:39.413526275 +0200
@@ -164,11 +164,13 @@
     return c->fd;
 }
 
+#define REMOVE_PROTO(x) if(av_strstart(x, "file:", &x)) av_strstart(x, "//", &x); // eum.
+
 static int file_check(URLContext *h, int mask)
 {
     int ret = 0;
     const char *filename = h->filename;
-    av_strstart(filename, "file:", &filename);
+    REMOVE_PROTO(filename)
 
     {
 #if HAVE_ACCESS && defined(R_OK)
@@ -252,7 +254,7 @@
 #if HAVE_UNISTD_H
     int ret;
     const char *filename = h->filename;
-    av_strstart(filename, "file:", &filename);
+    REMOVE_PROTO(filename)
 
     ret = rmdir(filename);
     if (ret < 0 && (errno == ENOTDIR
@@ -274,8 +276,8 @@
 {
     const char *filename_src = h_src->filename;
     const char *filename_dst = h_dst->filename;
-    av_strstart(filename_src, "file:", &filename_src);
-    av_strstart(filename_dst, "file:", &filename_dst);
+    REMOVE_PROTO(filename_src)
+    REMOVE_PROTO(filename_dst)
 
     if (rename(filename_src, filename_dst) < 0)
         return AVERROR(errno);
@@ -290,7 +292,7 @@
     int fd;
     struct stat st;
 
-    av_strstart(filename, "file:", &filename);
+    REMOVE_PROTO(filename)
 
     c->initial_pos = -1;
     if (flags & AVIO_FLAG_WRITE && flags & AVIO_FLAG_READ) {
