aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/file.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-04-26 22:36:51 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-04-26 22:36:51 +0000
commitec6791736c94af12ec49010cdbc98d1f10ef7de0 (patch)
tree239e6916ec0bd83b752987e32e9e42c66b2388ba /libavformat/file.c
parent932d775fa2d66ce26ce182c8499678f97ecad63c (diff)
downloadffmpeg-ec6791736c94af12ec49010cdbc98d1f10ef7de0.tar.gz
Make file_open() return the error code set in errno if open() fails,
rather than always ENOENT. Originally committed as revision 22972 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/file.c')
-rw-r--r--libavformat/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index d42a678c98..8873d5fcaf 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -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;
}