update variance if sync pulse is for more than buffer_length time missing

This commit is contained in:
Ahmet Inan 2014-12-06 19:31:21 +01:00
parent 5bcbd18dc7
commit 270d20486c

View file

@ -71,7 +71,7 @@ static int scanline_estimator(int sync_level)
int sync_pulse = !sync_level && sync_counter >= minimum_sync_length;
sync_counter = sync_level ? sync_counter + 1 : 0;
if (!sync_pulse) {
if (!sync_pulse && scanline_counter < buffer_length) {
++scanline_counter;
return -1;
}