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