[vlc-commits] sap: remove useless sdp_t.psz_sdp

Rémi Denis-Courmont git at videolan.org
Fri Apr 10 15:07:02 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Apr 10 15:05:24 2020 +0300| [5b1cb21d130b61a8554fab5dc75ba444bf5fa82f] | committer: Rémi Denis-Courmont

sap: remove useless sdp_t.psz_sdp

It was only written and read in a single ParseSAP() call.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b1cb21d130b61a8554fab5dc75ba444bf5fa82f
---

 modules/services_discovery/sap.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 663ff30815..a0e1ec6809 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -122,8 +122,6 @@ struct sdp_media_t
 /* The structure that contains sdp information */
 typedef struct sdp_t
 {
-    const char *psz_sdp;
-
     /* o field */
     char     username[64];
 
@@ -1195,8 +1193,6 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
     if( p_sdp == NULL )
         goto error;
 
-    p_sdp->psz_sdp = psz_sdp;
-
     /* Decide whether we should add a playlist item for this SDP */
     /* Parse connection information (c= & m= ) */
     char *uri = ParseConnection( VLC_OBJECT(p_sd), p_sdp );
@@ -1205,7 +1201,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
     if( !p_sys->b_parse )
     {
         free(uri);
-        if (asprintf(&uri, "sdp://%s", p_sdp->psz_sdp) == -1)
+        if (asprintf(&uri, "sdp://%s", psz_sdp) == -1)
             uri = NULL;
     }
 



More information about the vlc-commits mailing list