From 4f345a96ca9a1c36b50991262170d239fd8bb359 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Sun, 18 Aug 2019 00:39:46 -0700 Subject: [PATCH] does not work yet with iOS, only iTunes --- components/raop/raop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/raop/raop.c b/components/raop/raop.c index 7554d553..5cfbfe09 100644 --- a/components/raop/raop.c +++ b/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);