diff options
-rw-r--r-- | libavutil/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/file.c b/libavutil/file.c index b325149..1ccb692 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -54,10 +54,10 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, return err; } - if (stat(filename, &st) < 0) { + if (fstat(fd, &st) < 0) { err = AVERROR(errno); av_strerror(err, errbuf, sizeof(errbuf)); - av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in lstat(): %s\n", errbuf); + av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in fstat(): %s\n", errbuf); close(fd); return err; } |