Browse Source

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
tags/v0.6
Stefano Sabatini 15 years ago
parent
commit
ec6791736c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/file.c

+ 1
- 1
libavformat/file.c View File

@@ -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;
}


Loading…
Cancel
Save