From ec6791736c94af12ec49010cdbc98d1f10ef7de0 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Mon, 26 Apr 2010 22:36:51 +0000 Subject: [PATCH] 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 --- libavformat/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }