]> git.sesse.net Git - vlc/blobdiff - modules/services_discovery/sap.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / services_discovery / sap.c
index 6d6bce6bafb4f2c67adc5d7e1c600605df5dbb6b..23b8c946238a85387737fb9b505ce951f5f1d5a7 100644 (file)
@@ -303,7 +303,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->b_timeshift = var_CreateGetInteger( p_sd, "sap-timeshift" );
 
     /* Set our name */
-    services_discovery_SetLocalizedName( p_sd, _("SAP sessions") );
+    services_discovery_SetLocalizedName( p_sd, _("SAP") );
 
     p_sys->i_announces = 0;
     p_sys->pp_announces = NULL;
@@ -317,7 +317,7 @@ static int Open( vlc_object_t *p_this )
 static int OpenDemux( vlc_object_t *p_this )
 {
     demux_t *p_demux = (demux_t *)p_this;
-    uint8_t *p_peek;
+    const uint8_t *p_peek;
     char *psz_sdp = NULL;
     sdp_t *p_sdp = NULL;
     int errval = VLC_EGENERIC;
@@ -494,7 +494,7 @@ static void Run( services_discovery_t *p_sd )
         if( s != INVALID_SOCKET )
         {
             INTERFACE_INFO ifaces[10]; // Assume there will be no more than 10 IP interfaces
-            size_t len = sizeof(ifaces); 
+            size_t len = sizeof(ifaces);
 
             if( SOCKET_ERROR != WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0, &ifaces, len, &len, NULL, NULL) )
             {
@@ -590,13 +590,13 @@ static int Demux( demux_t *p_demux )
         return VLC_EGENERIC;
     }
 
-    p_parent_input = input_GetItem(p_input);
+    p_parent_input = input_GetItem( p_input );
+
+    input_item_SetURI( p_parent_input, p_sdp->psz_uri );
+    input_item_SetName( p_parent_input, p_sdp->psz_sessionname );
 
     vlc_mutex_lock( &p_parent_input->lock );
-    FREENULL( p_parent_input->psz_uri );
-    p_parent_input->psz_uri = strdup( p_sdp->psz_uri );
-    FREENULL( p_parent_input->psz_name );
-    p_parent_input->psz_name = strdup( p_sdp->psz_sessionname );
+
     p_parent_input->i_type = ITEM_TYPE_NET;
 
     if( p_playlist->status.p_item &&