Hi,
here's an updated patch for 0.8.6h since those http sap announcements
are still around in some places.
Cheers,
 -- Guido
diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 3d664de..72a5fd4 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -910,6 +911,7 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
     char *psz_eof = NULL;
     char *psz_parse = NULL;
     char *psz_uri = NULL;
+    char *psz_path = NULL;
     const char *psz_proto = NULL;
     char psz_source[258] = "";
     int i_port = 0;
@@ -1054,6 +1056,12 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
                 psz_proto = "udp";
                 p_sdp->i_media_type = 33;
             }
+            else /* HTTP support */
+            if( !strncasecmp( psz_parse, "HTTP", 4) ) {
+                psz_path = GetAttribute( p_sdp, "http-path");
+                psz_proto = "http";
+                p_sdp->i_media_type = 33;
+            }
             else
             {
                 msg_Warn( p_obj, "unknown transport protocol %s", psz_parse );
@@ -1069,7 +1077,8 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
         }
     }
 
-    /* FIXME: HTTP support */
+    if( psz_path == NULL )
+        psz_path="";
 
     if( i_port == 0 )
     {
@@ -1091,8 +1100,8 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
         }
     }
 
-    asprintf( &p_sdp->psz_uri, "%s://%...@%s:%i", psz_proto, psz_source,
-              psz_uri, i_port );
+    asprintf( &p_sdp->psz_uri, "%s://%...@%s:%i%s", psz_proto, psz_source,
+              psz_uri, i_port, psz_path );
 
     FREE( psz_uri );
     return VLC_SUCCESS;

Reply via email to