From: Mike Brady Date: Wed, 18 Apr 2018 19:29:16 +0000 (+0100) Subject: Make resend requests come from tyhe control socket rather than the audio socket.... X-Git-Tag: 3.2RC4~4^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0738ddeac8871b9eafbe55e1bb763f6a77bfb9d6;p=thirdparty%2Fshairport-sync.git Make resend requests come from tyhe control socket rather than the audio socket. This makes it work with AirAudio and according to the unofficial standard. --- diff --git a/rtp.c b/rtp.c index b0099910..e0718148 100644 --- a/rtp.c +++ b/rtp.c @@ -960,7 +960,7 @@ void rtp_request_resend(seq_t first, uint32_t count, rtsp_conn_info *conn) { char req[8]; // *not* a standard RTCP NACK req[0] = 0x80; req[1] = (char)0x55 | (char)0x80; // Apple 'resend' - *(unsigned short *)(req + 2) = htons(1); // our seqnum + *(unsigned short *)(req + 2) = htons(1); // our sequence number *(unsigned short *)(req + 4) = htons(first); // missed seqnum *(unsigned short *)(req + 6) = htons(count); // count socklen_t msgsize = sizeof(struct sockaddr_in); @@ -976,7 +976,7 @@ void rtp_request_resend(seq_t first, uint32_t count, rtsp_conn_info *conn) { resend_error_backoff_time)) { if ((config.diagnostic_drop_packet_fraction == 0.0) || (drand48() > config.diagnostic_drop_packet_fraction)) { - if (sendto(conn->audio_socket, req, sizeof(req), 0, + if (sendto(conn->control_socket, req, sizeof(req), 0, (struct sockaddr *)&conn->rtp_client_control_socket, msgsize) == -1) { char em[1024]; strerror_r(errno, em, sizeof(em));