--- branches/dev-api-4/xvidcore/vfw/src/driverproc.c 2003/06/09 01:25:19 1053 +++ branches/dev-api-4/xvidcore/vfw/src/driverproc.c 2004/01/03 12:06:11 1305 @@ -1,32 +1,27 @@ -/************************************************************************** +/***************************************************************************** * - * XVID VFW FRONTEND - * driverproc main + * XVID MPEG-4 VFW FRONTEND + * - driverproc main - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * Copyright(C) 2001-2003 Peter Ross * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation ; either version 2 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - *************************************************************************/ - -/************************************************************************** - * - * History: + * You should have received a copy of the GNU General Public License + * along with this program ; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * 31.08.2002 Configure() export - * 01.12.2001 inital version; (c)2001 peter ross + * $Id: driverproc.c,v 1.1.2.7 2004-01-03 12:06:11 syskin Exp $ * - *************************************************************************/ + ****************************************************************************/ #include #include @@ -35,6 +30,7 @@ #include "debug.h" #include "codec.h" #include "config.h" +#include "status.h" #include "resource.h" @@ -47,7 +43,7 @@ return TRUE; } - +extern HINSTANCE m_hdll; /* __declspec(dllexport) */ LRESULT WINAPI DriverProc( DWORD dwDriverId, @@ -69,6 +65,7 @@ case DRV_OPEN : DPRINTF("DRV_OPEN"); + m_hdll = NULL; { ICOPEN * icopen = (ICOPEN *)lParam2; @@ -87,7 +84,9 @@ } return 0; } - + + + codec->status.hDlg = NULL; codec->config.ci_valid = 0; codec->ehandle = codec->dhandle = NULL; codec->fbase = 25; @@ -114,6 +113,7 @@ /* compress_end/decompress_end don't always get called */ compress_end(codec); decompress_end(codec); + status_destroy_always(&codec->status); free(codec); return DRV_OK; @@ -304,7 +304,7 @@ dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); if (dwDriverId != (DWORD)NULL) { - DriverProc(dwDriverId, 0, ICM_CONFIGURE, 0, 0); + DriverProc(dwDriverId, 0, ICM_CONFIGURE, (LPARAM)GetDesktopWindow(), 0); DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); } }