[FFmpeg-cvslog] file protocol: handle the file: protocol string in file_check

Anton Khirnov git at videolan.org
Thu Mar 23 17:40:36 EET 2017


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Oct 13 10:03:18 2016 +0200| [20b75970e43a030f959b17ff2dfd561174b6f24e] | committer: Anton Khirnov

file protocol: handle the file: protocol string in file_check

This is consistent with what file_open() does.

CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20b75970e43a030f959b17ff2dfd561174b6f24e
---

 libavformat/file.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/file.c b/libavformat/file.c
index 8683c1b..27ce4de 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -82,8 +82,13 @@ static int file_get_handle(URLContext *h)
 
 static int file_check(URLContext *h, int mask)
 {
+    const char *filename = h->filename;
     struct stat st;
-    int ret = stat(h->filename, &st);
+    int ret;
+
+    av_strstart(filename, "file:", &filename);
+
+    ret = stat(filename, &st);
     if (ret < 0)
         return AVERROR(errno);
 



More information about the ffmpeg-cvslog mailing list