[FFmpeg-devel] [PATCH v8 0/3] Support long file names on Windows

Martin Storsjö martin at martin.st
Fri Jun 10 00:02:42 EEST 2022


On Thu, 9 Jun 2022, nil-admirari at mailo.com wrote:

>> This error isn't reproducible in git master - it's triggered by your
>> yet-unmerged patches (that include wchar_filename.h in w32dlfcn.h).
>
> Ok. It can be fixed by either
> - defining NO_DSHOW_STRSAFE in libavcodec/mf_utils.h
> - or by migrating os_support.h to StrSafe.h functions.
>
> Which way is preferable?

I think avoiding wcscat (with whatever usable alternative, not necessarily 
from strsafe.h) is the more robust solution, instead of having to play 
whack-a-mole with silencing such warnings. The 10 year old trac you 
referenced mentioned that the strsafe.h alternative functions weren't 
available in all toolchains used at that time though.

Or if we'd add the define projectwide in e.g. configure it probably 
wouldn't be that bad? Kinda like how we already add 
"-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS" in MSVC builds. 
Then we wouldn't need to worry about missing it somewhere accidentally.

// Martin



More information about the ffmpeg-devel mailing list