[FFmpeg-devel] [PATCH]configure: Assume MSVCRT when compiling with MingW
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Apr 22 02:50:29 EEST 2018
2018-04-22 1:29 GMT+02:00, Hendrik Leppkes <h.leppkes at gmail.com>:
> On Sun, Apr 22, 2018 at 1:02 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
> wrote:
>> 2018-04-22 0:53 GMT+02:00, Reino Wijnsma <rwijnsma at xs4all.nl>:
>>> On 21-4-2018 22:43, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>>> Attached patch is supposed to fix an old issue with debug messages and
>>>> a currently reported compilation warning that I believe also indicates
>>>> a possible abort() on Windows:
>>>> libavformat/hlsenc.c:1676:63: warning: unknown conversion type
>>>> character 's' in format
>>>> Patch untested.
>>>>
>>>> Please review, Carl Eugen
>>> I'm hardly an expert, but I'm not sure this is a good idea.
>>> After configuring FFmpeg summarizes:
>>> [...]
>>> C library msvcrt
>>> [...]
>>> This has always been "mingw64" before. And next:
>>>
>>> $ make libavformat/hlsenc.o
>>> CC libavformat/hlsenc.o
>>> In file included from ./libavutil/common.h:491:0,
>>> from ./libavutil/avutil.h:296,
>>> from ./libavutil/avassert.h:31,
>>> from libavformat/hlsenc.c:36:
>>> ./libavutil/internal.h:250:10: fatal error: crtversion.h: No such file or
>>> directory
>>
>> Thank you for testing.
>
> To clarify: The C library flag controls both the build and runtime
> environment, not only the runtime environment. Usually thats
> identical, but in the case of mingw it is not, so extra care has to be
> taken.
>
>>
>> Note that I believe the warning indicates a possible
>> crash on runtime.
>>
>
> It would only crash if you use the security-enhanced versions of the
> format functions (ie. with a _s suffix), which we obviously don't.
People repeatedly reported such crashes (they only happen
in rare cases because debug output and/or broken streams
are needed) - how did they change the functions?
Carl Eugen
More information about the ffmpeg-devel
mailing list