Fix av_file_map(): replace stat(filename, &st) with fstat(fd, &st).