From fab829cfde4b05c2889104f3e7a389d52b8e91c4 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Sat, 7 Jun 2014 17:38:43 +0000 Subject: [PATCH] Change no-audio timeout from 4 to 6 seconds. An then, only ask to teardown once. --- player.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/player.c b/player.c index 6cc45450..191e1c5e 100644 --- a/player.c +++ b/player.c @@ -324,11 +324,12 @@ 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 4 seconds have elapsed since the last audio packet was received, then we should stop + // if 6 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)4<<32) { + if (local_time_now-time_of_last_audio_packet>=(uint64_t)6<<32) { debug(1,"As Yeats didn't say, \"Too long a silence makes a stone of the heart.\""); rtsp_request_shutdown_stream(); + shutdown_requested=1; } }