[FFmpeg-devel] [PATCH 2/2] avformat/os_support: Support long file names on Windows

nil-admirari at mailo.com nil-admirari at mailo.com
Sun May 15 22:13:16 EEST 2022


> diff --git a/libavformat/os_support.h b/libavformat/os_support.h

In addition to what you've already added, this file defines stat as:

#ifdef _WIN32
...
#  ifdef stat
#   undef stat
#  endif
#  define stat _stati64
...

which is
1. not wide-char aware (_wstati64 does exist)
2. not long path aware.

Also there is a function:

static inline int is_dos_path(const char *path)
{
#if HAVE_DOS_PATHS
    if (path[0] && path[1] == ':')
        return 1;
#endif
    return 0;
}

Now, DOS paths C:... end up being \\?\C:.... Are you sure it won't break something down the line?





More information about the ffmpeg-devel mailing list