[vlc-devel] commit: DShow: fix configure dialog probe (Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Jun 10 03:05:14 CEST 2009


vlc | branch: 1.0-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jun 10 03:04:09 2009 +0200| [a6110fb1d253146810bbe5f9b5ba0097b72b4e3c] | committer: Jean-Baptiste Kempf 

DShow: fix configure dialog probe

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

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

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 5dbce84..eb5d2da 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -2008,20 +2008,25 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
 {
     module_config_t *p_item;
     bool b_audio = false;
+    const char *psz_device = NULL;
+
+    if( !EMPTY_STR( newval.psz_string ) )
+        psz_device = strdup( newval.psz_string );
 
     /* Initialize OLE/COM */
     CoInitialize( 0 );
 
     p_item = config_FindConfig( p_this, psz_name );
+
     if( !p_item ) return VLC_SUCCESS;
 
     if( !strcmp( psz_name, "dshow-adev" ) ) b_audio = true;
 
     string devicename;
 
-    if( newval.psz_string && *newval.psz_string )
+    if( psz_device )
     {
-        devicename = newval.psz_string;
+        devicename = psz_device ;
     }
     else
     {




More information about the vlc-devel mailing list