Make the timeout for unexplained loss of audio packets 120 seconds, up from 6 seconds. Too short a delay can make the source think shaiport has gone away. There might be a better way to do this.

This commit is contained in:
Mike Brady
2014-06-12 11:11:17 +01:00
parent 3f121c2b05
commit 115991ca24
+2 -2
View File
@@ -324,9 +324,9 @@ static abuf_t *buffer_get_frame(void) {
clock_gettime(CLOCK_MONOTONIC,&tn);
local_time_now=((uint64_t)tn.tv_sec<<32)+((uint64_t)tn.tv_nsec<<32)/1000000000;
// if 6 seconds have elapsed since the last audio packet was received, then we should stop
// if 120 seconds have elapsed since the last audio packet was received, then we should stop
if ((time_of_last_audio_packet!=0) && (shutdown_requested==0)) {
if (local_time_now-time_of_last_audio_packet>=(uint64_t)6<<32) {
if (local_time_now-time_of_last_audio_packet>=(uint64_t)120<<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;