]> git.sesse.net Git - vlc/commitdiff
mms/tcp: send requested media file path to the server without leading / character
authorbl4 <bl4@playker.info>
Fri, 23 May 2008 13:50:27 +0000 (15:50 +0200)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 23 May 2008 15:01:24 +0000 (18:01 +0300)
Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>
modules/access/mms/mmstu.c

index 6edd89f2363a76b04cb58504c4fc7326e5fcdda3..7b417456a9e6fc0d0296a5c69c1a6f67b97ad52e 100644 (file)
@@ -460,6 +460,7 @@ static int MMSOpen( access_t  *p_access, vlc_url_t *p_url, int  i_proto )
     int          i;
     int          i_streams;
     int          i_first;
+    char         *mediapath;
 
 
     /* *** Open a TCP connection with server *** */
@@ -620,7 +621,14 @@ static int MMSOpen( access_t  *p_access, vlc_url_t *p_url, int  i_proto )
     /* *** send command 5 : media file name/path requested *** */
     var_buffer_reinitwrite( &buffer, 0 );
     var_buffer_add64( &buffer, 0 );
-    var_buffer_addUTF16( &buffer, p_url->psz_path );
+
+    /* media file path shouldn't start with / character */
+    mediapath = p_url->psz_path;
+    if ( *mediapath == '/' )
+    {
+        mediapath++;
+    }
+    var_buffer_addUTF16( &buffer, mediapath );
 
     mms_CommandSend( p_access,
                      0x05,