Forráskód Böngészése

does not work yet with iOS, only iTunes

philippe44 5 éve
szülő
commit
4f345a96ca
1 módosított fájl, 4 hozzáadás és 3 törlés
  1. 4 3
      components/raop/raop.c

+ 4 - 3
components/raop/raop.c

@@ -493,9 +493,10 @@ static bool handle_rtsp(raop_ctx_t *ctx, int sock)
 			kd_add(resp, "Audio-Latency", latency);
 		}
 
-		buf = kd_lookup(headers, "RTP-Info");
-		if ((p = strcasestr(buf, "seq")) != NULL) sscanf(p, "%*[^=]=%hu", &seqno);
-		if ((p = strcasestr(buf, "rtptime")) != NULL) sscanf(p, "%*[^=]=%u", &rtptime);
+		if ((buf = kd_lookup(headers, "RTP-Info")) != NULL) {
+			if ((p = strcasestr(buf, "seq")) != NULL) sscanf(p, "%*[^=]=%hu", &seqno);
+			if ((p = strcasestr(buf, "rtptime")) != NULL) sscanf(p, "%*[^=]=%u", &rtptime);
+    	}
 
 		if (ctx->rtp) rtp_record(ctx->rtp, seqno, rtptime);