[vlc-devel] commit: mms/tcp: send requested media file path to the server without leading / character ( bl4 )
git version control
git at videolan.org
Fri May 23 17:00:06 CEST 2008
vlc | branch: master | bl4 <bl4 at playker.info> | Fri May 23 15:50:27 2008 +0200| [da9d2466b1e689e3f45c6a02ad3119d2d7b1e467]
mms/tcp: send requested media file path to the server without leading / character
Signed-off-by: Rémi Denis-Courmont <rem at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da9d2466b1e689e3f45c6a02ad3119d2d7b1e467
---
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,
More information about the vlc-devel
mailing list