Commit ec679173 authored by Stefano Sabatini's avatar Stefano Sabatini

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
parent 932d775f
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment