changeset 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 f74198942337
children 55c714a8fb00
files file.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;
 }