Module: libav
Branch: release/11
Commit: e29eee8688f6b7ada1fd09464fca69283e0a8555

Author:    Anton Khirnov <an...@khirnov.net>
Committer: Anton Khirnov <an...@khirnov.net>
Date:      Thu Oct 13 10:03:18 2016 +0200

file protocol: handle the file: protocol string in file_check

This is consistent with what file_open() does.

CC: libav-sta...@libav.org
(cherry picked from commit 20b75970e43a030f959b17ff2dfd561174b6f24e)
Signed-off-by: Anton Khirnov <an...@khirnov.net>
(cherry picked from commit 0464c3c706c88c71dbaa5c8a3d07bcb69ab05abd)
Signed-off-by: Anton Khirnov <an...@khirnov.net>

---

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

diff --git a/libavformat/file.c b/libavformat/file.c
index b54db9a..f964634 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -78,8 +78,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);
 

_______________________________________________
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to