[FFmpeg-devel] [PATCH 4/4] Make file_open() return the error code set in errno if open() fails, rather than alwasy ENOENT.

Stefano Sabatini stefano.sabatini-lala
Mon Apr 26 01:16:39 CEST 2010


---
 libavformat/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/file.c b/libavformat/file.c
index d42a678..8873d5f 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;
 }
-- 
1.7.0




More information about the ffmpeg-devel mailing list