[vlc-devel] commit: Fix the previsous commit: if the user or the password is set in the url, use ( Rémi Duraffort )

git version control git at videolan.org
Mon Jun 22 09:48:50 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jun 22 09:40:24 2009 +0200| [59f41e69f86aeec986b104955ef2a6acd0449fdc] | committer: Rémi Duraffort 

Fix the previsous commit: if the user or the password is set in the url, use
it.

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

 modules/demux/live555.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index be373cb..f271dd1 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -460,15 +460,15 @@ static int Connect( demux_t *p_demux )
     int  i_ret        = VLC_SUCCESS;
 
     if( p_sys->url.i_port == 0 ) p_sys->url.i_port = 554;
-    if( p_sys->url.psz_username && p_sys->url.psz_password )
+    if( p_sys->url.psz_username || p_sys->url.psz_password )
     {
         int err;
         err = asprintf( &psz_url, "rtsp://%s:%d%s", p_sys->url.psz_host,
                         p_sys->url.i_port, p_sys->url.psz_path );
         if( err == -1 ) return VLC_ENOMEM;
 
-        psz_user = strdup( p_sys->url.psz_username );
-        psz_pwd  = strdup( p_sys->url.psz_password );
+        psz_user = strdup( p_sys->url.psz_username ? p_sys->url.psz_username : "" );
+        psz_pwd  = strdup( p_sys->url.psz_password ? p_sys->url.psz_password : "");
     }
     else
     {




More information about the vlc-devel mailing list