Accept clock estimation with a single point

If there is only one point, assume the slope is 1.

PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757>
This commit is contained in:
Romain Vimont
2023-03-02 22:13:48 +01:00
parent 48a537d45c
commit 9b3ca208bf
2 changed files with 15 additions and 12 deletions

View File

@@ -196,10 +196,8 @@ sc_delay_buffer_frame_sink_push(struct sc_frame_sink *sink,
if (db->clock.count == 1) {
sc_mutex_unlock(&db->mutex);
// First frame, push it immediately, for two reasons:
// - not to delay the opening of the scrcpy window
// - the buffering estimation needs at least two clock points, so it
// could not handle the first frame
// First frame, push it immediately, not to delay the opening of the
// scrcpy window
return sc_frame_source_sinks_push(&db->frame_source, frame);
}