[vlc-devel] commit: Factorize. ( Rémi Duraffort )

git version control git at videolan.org
Sun Jun 21 12:28:36 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jun 21 12:28:16 2009 +0200| [004a16fb1f4be2d6067646ccb1e1a0e8a1ae4b03] | committer: Rémi Duraffort 

Factorize.

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

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

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 3fbd317..96242f5 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -2003,6 +2003,7 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
     module_config_t *p_item;
     bool b_audio = false;
     char *psz_device = NULL;
+    int i_ret = VLC_SUCCESS;
 
     if( !EMPTY_STR( newval.psz_string ) )
         psz_device = strdup( newval.psz_string );
@@ -2046,19 +2047,15 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
     }
     else
     {
-        /* Uninitialize OLE/COM */
-        CoUninitialize();
-
         msg_Err( p_this, "didn't find device: %s", devicename.c_str() );
-        free( psz_device );
-        return VLC_EGENERIC;
+        i_ret = VLC_EGENERIC;
     }
 
     /* Uninitialize OLE/COM */
     CoUninitialize();
 
     free( psz_device );
-    return VLC_SUCCESS;
+    return i_ret;
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list