]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/file.c
Make file_open() return the error code set in errno if open() fails,
[ffmpeg] / libavformat / file.c
index d42a678c9839bf778c452c8ddb74e9106931e993..8873d5fcafe8ba61d826400bb1ee3fb7b245487f 100644 (file)
@@ -53,7 +53,7 @@ static int file_open(URLContext *h, const char *filename, int flags)
 #endif
     fd = open(filename, access, 0666);
     if (fd == -1)
-        return AVERROR(ENOENT);
+        return AVERROR(errno);
     h->priv_data = (void *) (intptr_t) fd;
     return 0;
 }