Commit 124aaa1e authored by Stefan Westerfeld's avatar Stefan Westerfeld

Introduce rounding for speed detection again, avoid lrint() though.

While for long clips rounding doesn't help (much), it does for short
clips.
Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 8566cf1f
......@@ -302,7 +302,7 @@ SpeedSync::compare_bits (BitValue *bit_values, double relative_speed, int *start
for (auto si = sync_bits.begin() + mi; si != sync_bits.end(); si++)
{
int index = (offset + si->frame * steps_per_frame) * relative_speed_inv;
int index = (offset + si->frame * steps_per_frame) * relative_speed_inv + 0.5;
if (index >= sync_matrix.rows())
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment