[FFmpeg-devel] [PATCH] Fix libavdevice/vfwcap.c for w32api-3.12

Ramiro Polla ramiro.polla
Fri Sep 26 14:51:58 CEST 2008


On Wed, Sep 10, 2008 at 1:35 PM, JonY <10walls at gmail.com> wrote:
> Ramiro Polla wrote:
>>> Index: libavdevice/vfwcap.c
>>> ===================================================================
>>> --- libavdevice/vfwcap.c     (revision 15290)
>>> +++ libavdevice/vfwcap.c     (working copy)
>>> @@ -19,6 +19,10 @@
>>>    * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>>>    */
>>> +#if !defined (WINVER) || (WINVER<  0x0500)
>>> +#warning vfwcap requires Windows 2000/XP
>>> +#define WINVER 0x0500
>>> +#endif
>> I think there are other parts of FFmpeg that expect Windows to be
>> 2000/XP already (GetProcessTimes() IIRC). Besides this shouldn't be in
>> compile-time since FFmpeg specifies all the CFLAGS to be used.
>> I haven't tested with Windows 98 for over a year now, and I don't think
>> anyone cares about it anymore... I don't even know if it will refuse to
>> run because of missing functions or just not work properly.
> Good point, I haven't heard of any FFmpeg users still on 9X systems.
> Should configure add -DWINVER=0x0500 for MinGW builds?

I tested the executable on Windows 98. It runs ok, but -benchmark
prints out random numbers and vfwcap doesn't work.

I'm thinking maybe -DWINVER=0x0500 should be default for MinGW, and
there should be a --target-os=win98 which just sets it appropriately.
This way GetProcessTimes() isn't found (and the av_gettime() fallback
is used), and there should either be a check for HWND_MESSAGE (which
would disable vfwcap) or the implementation could create and use an
invisible window instead of using HWND_MESSAGE (only under win98

Either way I'm not interested in implementing any of the above ATM.

Ramiro Polla

More information about the ffmpeg-devel mailing list