From 270d20486c95419cf9f891c13575bd9145b86fcb Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Sat, 6 Dec 2014 19:31:21 +0100 Subject: [PATCH] update variance if sync pulse is for more than buffer_length time missing --- app/src/main/rs/scanline_estimator.rsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/rs/scanline_estimator.rsh b/app/src/main/rs/scanline_estimator.rsh index af5e89d..2f5b54e 100644 --- a/app/src/main/rs/scanline_estimator.rsh +++ b/app/src/main/rs/scanline_estimator.rsh @@ -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; }