[vlc-devel] commit: Revert some errors in 859436564cd0b85e76b888a88205424ede9cb412 and 9630c00c6b310e1a824f0bce00de89f0f777484f ( Rémi Duraffort )

git version control git at videolan.org
Thu Mar 13 19:20:12 CET 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Mar 13 19:17:42 2008 +0100| [0305cdacc18e39d01efe5a10485c9109f8818798]

Revert some errors in 859436564cd0b85e76b888a88205424ede9cb412 and 9630c00c6b310e1a824f0bce00de89f0f777484f

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

 modules/access/smb.c            |    8 ++++----
 src/video_output/video_output.c |    4 ++--
 src/video_output/vout_intf.c    |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/access/smb.c b/modules/access/smb.c
index b14629c..680d49b 100644
--- a/modules/access/smb.c
+++ b/modules/access/smb.c
@@ -188,11 +188,11 @@ static int Open( vlc_object_t *p_this )
      * smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
 
     if( !psz_user ) psz_user = var_CreateGetString( p_access, "smb-user" );
-    if( !*psz_user ) { free( psz_user ); psz_user = 0; }
+    if( psz_user && !*psz_user ) { free( psz_user ); psz_user = 0; }
     if( !psz_pwd ) psz_pwd = var_CreateGetString( p_access, "smb-pwd" );
-    if( !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; }
-    if(!psz_domain) psz_domain = var_CreateGetString( p_access, "smb-domain" );
-    if( !*psz_domain ) { free( psz_domain ); psz_domain = 0; }
+    if( psz_pwd && !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; }
+    if( !psz_domain ) psz_domain = var_CreateGetString( p_access, "smb-domain" );
+    if( psz_domain && !*psz_domain ) { free( psz_domain ); psz_domain = 0; }
 
 #ifdef WIN32
     if( psz_user )
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index e97cb57..bea793c 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -177,12 +177,12 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
             var_Get( p_vout, "vout-filter", &val );
             psz_filter_chain = val.psz_string;
 
-            if( !*psz_filter_chain )
+            if( psz_filter_chain && !*psz_filter_chain )
             {
                 free( psz_filter_chain );
                 psz_filter_chain = NULL;
             }
-            if( !*p_vout->psz_filter_chain )
+            if( p_vout->psz_filter_chain && !*p_vout->psz_filter_chain )
             {
                 free( p_vout->psz_filter_chain );
                 p_vout->psz_filter_chain = NULL;
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index f210f5b..fcd8725 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -481,7 +481,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
     memset( &fmt_out, 0, sizeof(video_format_t) );
 
     var_Get( p_vout, "snapshot-path", &val );
-    if( !*val.psz_string )
+    if( val.psz_string && !*val.psz_string )
     {
         free( val.psz_string );
         val.psz_string = 0;




More information about the vlc-devel mailing list