From 72f1cc9dd01d201d10a46f31d59d1ac910256664 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 11 Aug 2002 15:03:10 +0000 Subject: fix long standing bug of segfaults on exit. stupid me: i had overlooked this CodecAlloc/CodecRelease stuff... CVS patchset: 2430 CVS date: 2002/08/11 15:03:10 --- src/libw32dll/wine/afl.c | 2 ++ src/libw32dll/wine/driver.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libw32dll/wine/afl.c b/src/libw32dll/wine/afl.c index 693d152e3..a887ead80 100644 --- a/src/libw32dll/wine/afl.c +++ b/src/libw32dll/wine/afl.c @@ -512,6 +512,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw if (phas) *phas = (HACMSTREAM)was; TRACE("=> (%d)\n", ret); + CodecAlloc(); return ret; } errCleanUp: @@ -538,6 +539,7 @@ MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose) if (was->hAcmDriver) acmDriverClose(was->hAcmDriver, 0L); HeapFree(MSACM_hHeap, 0, was); + CodecRelease(); } TRACE("=> (%d)\n", ret); return ret; diff --git a/src/libw32dll/wine/driver.c b/src/libw32dll/wine/driver.c index 59ffdd768..822d0167f 100644 --- a/src/libw32dll/wine/driver.c +++ b/src/libw32dll/wine/driver.c @@ -96,7 +96,7 @@ static NPDRVR DrvAlloc(HDRVR*lpDriver, LPUINT lpDrvResult) static void DrvFree(HDRVR hDriver) { - int i; + /* int i; -- unused */ Setup_FS_Segment(); if(hDriver) if(((DRVR*)hDriver)->hDriverModule) @@ -115,6 +115,7 @@ static void DrvFree(HDRVR hDriver) void DrvClose(HDRVR hdrvr) { DrvFree(hdrvr); + CodecRelease(); } @@ -123,7 +124,7 @@ char* win32_codec_name=NULL; // must be set before calling DrvOpen() !!! HDRVR VFWAPI DrvOpen(LPARAM lParam2) { - ICOPEN *icopen=(ICOPEN *) lParam2; + /* ICOPEN *icopen=(ICOPEN *) lParam2; -- unused */ UINT uDrvResult; HDRVR hDriver; NPDRVR npDriver; @@ -221,6 +222,7 @@ DrvOpen(LPARAM lParam2) // printf("Successfully loaded codec %s\n",win32_codec_name); + CodecAlloc(); return (hDriver); } -- cgit v1.2.3