Chung Leong in php.pecl.dev (Wed, 23 Apr 2014 04:06:33 +0200):
>Okay, I tried loading the FFmpeg DLLs manually. It turns out that it's
>impossible to avoid loading MSVCRT.DLL into the process. FFmpeg imports
>from ADVAPI.DLL and USER32.DLL. Those system DLLs in turn will bring in
>MSVCRT.DLL. Even if we link statically or rebuild FFmpeg in VC, MSVCRT.DLL
>will still get loaded.

If you compile your own libav*.dll's with Visual Studio, that will not
happen. But to build a more or less complete FFmpeg feature set, you
will have to do that for every desired output format as well. So you
should also compile libx264, libvpx (for Webm), the upcoming libx265 et
cetera with native MSVC. Somebody seems to have a way to do that for
x264:
http://siliconandlithium.blogspot.nl/2014/03/building-x264-on-windows-with-visual.html

But it needs a lot of patching to the x264 code and you'll end up
struggling as a native MSVC FFmpeg builder. That is not what you want to
be.

>While I see some value in not loading an extra C runtime, if it's going to
>be there irregardless, I don't think it's worth the trouble avoiding it.
>The likelihood of MSVCRT.DLL working for FFMPEG.EXE but somehow failing
>when the same code is used in a PHP extension is exceedingly low. I just
>don't see how that can happen.

I agree on this one. But a disclaimer in the readme.md of your extension
with a reference to this discussion will not harm anybody.

Jan

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to