Only accept first rtpmap and fmtp (assume they are for audio)
[deb_shairplay.git] / src / lib / sdp.c
index ecd6214baa06cb332eb1fa5a0c91fb46ebb69a33..b39661cd28f3b06282506ff04606329912ea4bc1 100644 (file)
@@ -75,9 +75,9 @@ parse_sdp_line(sdp_t *sdp, char *line)
                        if (!value) break;
                        *(value++) = '\0';
 
-                       if (!strcmp(key, "rtpmap")) {
+                       if (!strcmp(key, "rtpmap") && !sdp->rtpmap) {
                                sdp->rtpmap = value;
-                       } else if (!strcmp(key, "fmtp")) {
+                       } else if (!strcmp(key, "fmtp") && !sdp->fmtp) {
                                sdp->fmtp = value;
                        } else if (!strcmp(key, "rsaaeskey")) {
                                sdp->rsaaeskey = value;