From 8ddd5a58f3755bf6d3a678da6de1d78e75c75c93 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Mon, 3 Feb 2020 02:48:52 -0800 Subject: [PATCH] displat mixup ms and s in RAOP as BT natively sends ms --- components/raop/raop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/raop/raop.c b/components/raop/raop.c index 1838af8a..1f739c17 100644 --- a/components/raop/raop.c +++ b/components/raop/raop.c @@ -630,9 +630,10 @@ static bool handle_rtsp(raop_ctx_t *ctx, int sock) } else if (body && (p = strcasestr(body, "progress")) != NULL) { int start, current, stop = 0; + // we want ms, not s sscanf(p, "%*[^:]:%u/%u/%u", &start, ¤t, &stop); - current = (current - start) / 44100; - if (stop) stop = (stop - start) / 44100; + current = ((current - start) / 44100) * 1000; + if (stop) stop = ((stop - start) / 44100) * 1000; else stop = -1; LOG_INFO("[%p]: SET PARAMETER progress %u/%u %s", ctx, current, stop, p); success = ctx->cmd_cb(RAOP_PROGRESS, current, stop);