[XviD-devel] Bug in VFW frontend

Milan Cutka xvid-devel@xvid.org
Mon, 19 Aug 2002 10:03:34 +0200


Hi,

I'm currrently rewriting ffvfw (maybe you remember I used XviD VFW as
a base for it) and found a bug which caused incorrect releasing of
ffdshow object (ffvfw now can internaly use ffdshow image processing
filters exposed through COM interface during encoding).
In driverproc.c file in DriverProc function in switch which
processes ICM messages begins like this:

        switch(uMsg)
        {

        /* driver primitives */

        case DRV_LOAD :
        case DRV_FREE :
                DRV_OK;

but this is buggy, because DRV_OK is defined as DRVCNF_OK which is
just 0x0001 value and there is no break or return so the program
continues to next case statament, which is DRV_OPEN. This caused, at
least for me, creation of new instance of encoder even when DRV_FREE
was called.

   Milan