From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()
Date: Sun, 19 Jun 2022 10:49:11 +0300 (EEST)
Message-ID: <e68848e5-8e31-77fd-25d4-730feb67147@martin.st> (raw)
In-Reply-To: <DM8P223MB0365F6227EE81F2AB9B61008BAAE9@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM>
On Sat, 18 Jun 2022, Soft Works wrote:
>
>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Martin Storsjö
>> Sent: Sunday, June 19, 2022 12:24 AM
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove
>> MAX_PATH limit and use UTF-8 version of getenv()
>>
>> On Fri, 17 Jun 2022, Nil Admirari wrote:
>>
>>> 1. getenv() is replaced with getenv_utf8() across libavformat.
>>> 2. New versions of AviSynth+ are now called with UTF-8 filenames.
>>> 3. Old versions of AviSynth are still using ANSI strings,
>>> but MAX_PATH limit on filename is removed.
>>> ---
>>> libavformat/avisynth.c | 39 +++++++++++++++++++++++++++---------
>> ---
>>> libavformat/http.c | 20 +++++++++++++-------
>>> libavformat/ipfsgateway.c | 35 +++++++++++++++++++++++------------
>>> libavformat/tls.c | 11 +++++++++--
>>> 4 files changed, 72 insertions(+), 33 deletions(-)
>>>
>>> diff --git a/libavformat/http.c b/libavformat/http.c
>>> index c8f3f4b6a3..d90117e422 100644
>>> --- a/libavformat/http.c
>>> +++ b/libavformat/http.c
>>> @@ -29,6 +29,7 @@
>>> #include "libavutil/avassert.h"
>>> #include "libavutil/avstring.h"
>>> #include "libavutil/bprint.h"
>>> +#include "libavutil/getenv_utf8.h"
>>> #include "libavutil/opt.h"
>>> #include "libavutil/time.h"
>>> #include "libavutil/parseutils.h"
>>
>> This actually causes some surprise breakage in MSVC builds. Here,
>> getenv_utf8.h includes windows.h. If including windows.h and winsock2
>> headers in the same file, the winsock2 headers must be included
>> before.
>>
>> I fixed it locally by moving this new include down, with a comment
>> like
>> this:
>>
>> /* This header can include <windows.h>. That header has to be
>> included after
>> * winsock2 headers (included by network.h and os_support.h above).
>> */
>
> This is the recommended way:
>
>
> #define WIN32_LEAN_AND_MEAN
>
> #include <windows.h>
> #include <winsock2.h>
Thanks, adding #define WIN32_LEAN_AND_MEAN in wchar_filename.h fixes the
issue.
// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-06-19 7:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 9:31 [FFmpeg-devel] [PATCH v17 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi() and getenv_utf8() Nil Admirari
2022-06-17 9:31 ` [FFmpeg-devel] [PATCH v17 2/5] compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW Nil Admirari
2022-06-17 9:31 ` [FFmpeg-devel] [PATCH v17 3/5] fftools: Remove MAX_PATH limit and switch to UTF-8 versions of fopen() and getenv() Nil Admirari
2022-06-17 9:31 ` [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv() Nil Admirari
2022-06-18 22:24 ` Martin Storsjö
2022-06-18 22:36 ` Martin Storsjö
2022-06-18 22:48 ` Soft Works
2022-06-19 7:49 ` Martin Storsjö [this message]
2022-06-19 8:00 ` Soft Works
2022-06-19 11:44 ` nil-admirari
2022-06-18 22:40 ` Martin Storsjö
2022-06-19 11:47 ` nil-admirari
2022-06-17 9:31 ` [FFmpeg-devel] [PATCH v17 5/5] libavfilter/vf_frei0r.c: Use " Nil Admirari
2022-06-17 19:16 ` [FFmpeg-devel] [PATCH v17 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi() and getenv_utf8() Soft Works
2022-06-18 22:21 ` Martin Storsjö
2022-06-19 11:49 ` nil-admirari
2022-06-19 4:58 ` Andreas Rheinhardt
2022-06-19 5:56 ` Soft Works
2022-06-19 6:27 ` Andreas Rheinhardt
2022-06-19 7:24 ` Soft Works
2022-06-19 6:33 ` Martin Storsjö
2022-06-19 6:43 ` Andreas Rheinhardt
2022-06-19 11:56 ` nil-admirari
2022-06-20 0:54 ` Andreas Rheinhardt
2022-06-20 10:36 ` nil-admirari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e68848e5-8e31-77fd-25d4-730feb67147@martin.st \
--to=martin@martin.st \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git