fix flush of a large sync error, hopefully.

This commit is contained in:
Mike Brady
2021-05-13 20:10:38 +01:00
parent a3a7fb4849
commit bb226a4184
+2 -9
View File
@@ -2305,15 +2305,8 @@ void *player_thread_func(void *arg) {
debug(1, "Large positive sync error of: %" PRId64 " frames (%f seconds).",
sync_error, (sync_error * 1.0) / config.output_rate);
int64_t local_frames_to_drop = sync_error / conn->output_sample_ratio;
uint32_t frames_to_drop_sized = local_frames_to_drop;
debug_mutex_lock(&conn->flush_mutex, 1000, 1);
conn->flush_rtp_timestamp =
inframe->given_timestamp +
frames_to_drop_sized; // flush all packets up to (and including?) this
reset_input_flow_metrics(conn);
debug_mutex_unlock(&conn->flush_mutex, 3);
uint32_t frames_to_drop_sized = local_frames_to_drop;
do_flush(inframe->given_timestamp + frames_to_drop_sized, conn);
} else if ((sync_error < 0) && ((-sync_error) > filler_length)) {
debug(1,
"Large negative sync error of: %" PRId64