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

git version control git at videolan.org
Mon Jun 22 08:17:43 CEST 2009


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

Add missing CoUninitialize.
For each CoInitialize we have to call CoUninitialize.
(cherry picked from commit ac1c62c81e88bd87667ce557f630ec69a0aa7cc3)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 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 bbeaccf..3119bbc 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -2021,6 +2021,7 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
     if( !p_item )
     {
         free( psz_device );
+        CoUninitialize();
         return VLC_SUCCESS;
     }
 
@@ -2039,7 +2040,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