[vlc-devel] commit: Add missing CoUninitialize. ( Rémi Duraffort )

git version control git at videolan.org
Mon Jun 22 08:12:42 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jun 22 08:12:24 2009 +0200| [ac1c62c81e88bd87667ce557f630ec69a0aa7cc3] | committer: Rémi Duraffort 

Add missing CoUninitialize.
For each CoInitialize we have to call CoUninitialize.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac1c62c81e88bd87667ce557f630ec69a0aa7cc3
---

 modules/access/dshow/dshow.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 96242f5..2bde6b7 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -2016,6 +2016,7 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
     if( !p_item )
     {
         free( psz_device );
+        CoUninitialize();
         return VLC_SUCCESS;
     }
 
@@ -2034,7 +2035,11 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
 
         /* Enumerate devices */
         FindCaptureDevice( p_this, NULL, &list_devices, b_audio );
-        if( !list_devices.size() ) return VLC_EGENERIC;
+        if( !list_devices.size() )
+        {
+            CoUninitialize();
+            return VLC_EGENERIC;
+        }
         devicename = *list_devices.begin();
     }
 




More information about the vlc-devel mailing list