AirPlay fix & misc

- Spectrum scale fix
- Initialize more display parameters
- Reboot after 30s of no connection
- Reboot after IP address change
This commit is contained in:
philippe44
2020-03-07 14:01:53 -08:00
parent fae613eb33
commit 8e95bd3dd2
13 changed files with 127 additions and 62 deletions

View File

@@ -508,7 +508,7 @@ static bool handle_rtsp(raop_ctx_t *ctx, int sock)
// on announce, search remote
if ((buf = kd_lookup(headers, "DACP-ID")) != NULL) strcpy(ctx->active_remote.DACPid, buf);
if ((buf = kd_lookup(headers, "Active-Remote")) != NULL) strcpy(ctx->active_remote.id, buf);
#ifdef WIN32
ctx->active_remote.handle = init_mDNS(false, ctx->host);
pthread_create(&ctx->active_remote.thread, NULL, &search_remote, ctx);
@@ -570,7 +570,10 @@ static bool handle_rtsp(raop_ctx_t *ctx, int sock)
unsigned short seqno = 0;
unsigned rtptime = 0;
char *p;
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);
// only send FLUSH if useful (discards frames above buffer head and top)
if (ctx->rtp && rtp_flush(ctx->rtp, seqno, rtptime, true)) {