Package: vlc
Version: 0.8.6-svn20061012.debian-1
Severity: normal
Tags: patch

Hi,
currently when using SAP to announce HTTP Streams the URL is silently
being dropped (encoded in the http-path attribute). The attached patch
fetches the http-path attribute if available an appends it to the
generated URI.
Please apply,
 -- Guido


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.19-rc6-gf67d5831-dirty
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index c3b652a..35fa7c2 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -916,6 +917,7 @@ static int ParseConnection( vlc_object_t
     char *psz_parse = NULL;
     char *psz_uri = NULL;
     char *psz_proto = NULL;
+    char *psz_path = NULL;
     char psz_source[256];
     int i_port = 0;
 
@@ -1061,7 +1063,11 @@ static int ParseConnection( vlc_object_t
         psz_proto = strdup( "udp" );
     }
 
-    /* FIXME: HTTP support */
+    /* HTTP support */
+    if( psz_proto && !strncasecmp( psz_proto, "HTTP", 4 ) )
+       psz_path = GetAttribute( p_sdp, "http-path");
+    if( psz_path == NULL )
+       psz_path="";
 
     if( i_port == 0 )
     {
@@ -1074,8 +1080,8 @@ static int ParseConnection( vlc_object_t
 
     if( psz_parse ) sscanf( psz_parse, " incl IN IP%*s %*s %255s ", 
psz_source);
 
-    asprintf( &p_sdp->psz_uri, "%s://[EMAIL PROTECTED]:%i", psz_proto, 
psz_source,
-              psz_uri, i_port );
+    asprintf( &p_sdp->psz_uri, "%s://[EMAIL PROTECTED]:%i%s", psz_proto, 
psz_source,
+              psz_uri, i_port, psz_path );
 
     FREE( psz_uri );
     FREE( psz_proto );

Reply via email to