changeset 24576:6704a924d4aa

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
author diego
date Sun, 23 Sep 2007 20:37:33 +0000
parents 150adb2fd0ec
children 00966f09c33b
files TOOLS/vfw2menc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/TOOLS/vfw2menc.c	Sun Sep 23 20:23:29 2007 +0000
+++ b/TOOLS/vfw2menc.c	Sun Sep 23 20:37:33 2007 +0000
@@ -298,6 +298,6 @@
     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;
 }