Make the wait time less than the packet interval time to enable SPS to catch up if it gets behind.

This commit is contained in:
Mike Brady
2019-01-07 15:59:58 +00:00
parent 0e37f7e78d
commit 67a19bf3c9
+2 -2
View File
@@ -1198,8 +1198,8 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
if (wait) {
uint64_t time_to_wait_for_wakeup_fp =
((uint64_t)1 << 32) / conn->input_rate; // this is time period of one frame
time_to_wait_for_wakeup_fp *= 4 * 352; // four full 352-frame packets
time_to_wait_for_wakeup_fp /= 3; // four thirds of a packet time
time_to_wait_for_wakeup_fp *= 2 * 352; // two full 352-frame packets
time_to_wait_for_wakeup_fp /= 3; // two thirds of a packet time
#ifdef COMPILE_FOR_LINUX_AND_FREEBSD_AND_CYGWIN_AND_OPENBSD
uint64_t time_of_wakeup_fp = local_time_now + time_to_wait_for_wakeup_fp;