diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-04-26 22:36:51 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-04-26 22:36:51 +0000 |
commit | ec6791736c94af12ec49010cdbc98d1f10ef7de0 (patch) | |
tree | 239e6916ec0bd83b752987e32e9e42c66b2388ba /libavformat/file.c | |
parent | 932d775fa2d66ce26ce182c8499678f97ecad63c (diff) | |
download | ffmpeg-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.c | 2 |
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; } |