Redefine timeout to be an int rather than a 64-bit int. Bump to 2.1.10

This commit is contained in:
Mike Brady
2014-11-14 16:53:14 +00:00
parent f4d47dc75d
commit ffb37d2b53
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ typedef struct {
uint8_t hw_addr[6];
int port;
int resyncthreshold; // if it get's out of whack my more than this, resync. Zero means never resync.
uint64_t timeout; // while in play mode, exit if no packets of audio come in for more than this number of seconds . Zero means never exit.
int timeout; // while in play mode, exit if no packets of audio come in for more than this number of seconds . Zero means never exit.
char *output_name;
audio_output *output;
char *mdns_name;
+1 -1
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.50])
AC_INIT([shairport-sync], [2.1.9], [mikebrady@eircom.net])
AC_INIT([shairport-sync], [2.1.10], [mikebrady@eircom.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([shairport.c])
AC_CONFIG_HEADERS([config.h])
+2 -1
View File
@@ -409,7 +409,8 @@ static abuf_t *buffer_get_frame(void) {
// if config.timeout (default 120) seconds have elapsed since the last audio packet was received, then we should stop.
// config.timeout of zero means don't check..., but iTunes may be confused by a long gap followed by a resumption...
if ((time_of_last_audio_packet!=0) && (shutdown_requested==0) && (config.timeout!=0)) {
if (local_time_now-time_of_last_audio_packet>=config.timeout<<32) {
uint64_t ct = config.timeout; // go from int to 64-bit int
if (local_time_now-time_of_last_audio_packet>=ct<<32) {
debug(1,"As Yeats almost said, \"Too long a silence / can make a stone of the heart\"");
rtsp_request_shutdown_stream();
shutdown_requested=1;