From 06facf3a907b463a61bf4537f064591339442970 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 23 Sep 2007 20:37:33 +0000 Subject: [PATCH] According to MSDN a thread must call CoUninitialize once for each successful call it has made to CoInitialize or CoInitializeEx, including any call that returns S_FALSE. Only the CoUninitialize call corresponding to the CoInitialize or CoInitializeEx call that initialized the library can close it. patch by Gianluigi Tiesi, mplayer netfarm it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24596 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/vfw2menc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TOOLS/vfw2menc.c b/TOOLS/vfw2menc.c index 51d91ffd51..c03ae43654 100644 --- a/TOOLS/vfw2menc.c +++ b/TOOLS/vfw2menc.c @@ -298,6 +298,6 @@ cleanup: if (fourcc) free(fourcc); if (filename) free(filename); if (hDriver) CloseDriver(hDriver, 0, 0); - if (coinit == S_OK) CoUninitialize(); + if ((coinit == S_OK) || coinit == S_FALSE) CoUninitialize(); return ret; }