[PATCH] mms/tcp: send requested media file path to the server without leading / character
bl4
bl4 at playker.info
Fri May 23 15:50:27 CEST 2008
---
modules/access/mms/mmstu.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index 6edd89f..7b41745 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,
--
1.5.3.7
--------------050105010003020403060809--
More information about the vlc-devel
mailing list