diff file.c @ 5983:cb7e1e218016 libavformat

Make file_open() return the error code set in errno if open() fails, rather than always ENOENT.
author stefano
date Mon, 26 Apr 2010 22:36:51 +0000
parents 310b3b1b2921
children 7fdda2416684
line wrap: on
line diff
--- a/file.c	Sun Apr 25 14:27:42 2010 +0000
+++ b/file.c	Mon Apr 26 22:36:51 2010 +0000
@@ -53,7 +53,7 @@
 #endif
     fd = open(filename, access, 0666);
     if (fd == -1)
-        return AVERROR(ENOENT);
+        return AVERROR(errno);
     h->priv_data = (void *) (intptr_t) fd;
     return 0;
 }