From da9d2466b1e689e3f45c6a02ad3119d2d7b1e467 Mon Sep 17 00:00:00 2001 From: bl4 Date: Fri, 23 May 2008 15:50:27 +0200 Subject: [PATCH] mms/tcp: send requested media file path to the server without leading / character MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Denis-Courmont --- modules/access/mms/mmstu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c index 6edd89f236..7b417456a9 100644 --- a/modules/access/mms/mmstu.c +++ b/modules/access/mms/mmstu.c @@ -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, -- 2.39.5