diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-10-13 10:03:18 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-10-16 18:47:25 +0200 |
commit | 20b75970e43a030f959b17ff2dfd561174b6f24e (patch) | |
tree | 07d955f42c70aa4d76b2c9984686f90c3f255623 | |
parent | 7d8d726be7dc46343ab1c98c339c1ed44bcb07c1 (diff) | |
download | ffmpeg-20b75970e43a030f959b17ff2dfd561174b6f24e.tar.gz |
file protocol: handle the file: protocol string in file_check
This is consistent with what file_open() does.
CC: libav-stable@libav.org
-rw-r--r-- | libavformat/file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c index 8683c1bedd..27ce4de6eb 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); |