[FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: Replace MAX_PATH-sized buffers with dynamically sized ones

nil-admirari at mailo.com nil-admirari at mailo.com
Wed Feb 16 18:32:02 EET 2022


Previously there was GetModuleFileNameA. wchartoansi is used to match old behaviour. I can replace it with wchartoutf8 if you wish.

> - if (GetModuleFileNameA(GetModuleHandleA(NULL), datadir, sizeof(datadir) - 1))
> + if (wchartoansi(datadir_w, &datadir))
> + datadir = NULL;

From: Martin Storsjö <martin at martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: Replace MAX_PATH-sized buffers with dynamically sized ones
Date: 16/02/2022 17:08:12 Europe/Moscow

Why would you use ansi here? Aren't all internal char based paths supposed 
to be UTF-8, unless passing them to an external API that expects e.g. ACP 
paths?

// Martin





More information about the ffmpeg-devel mailing list