From b493a1f3d7fc99a8df51c0e76218663a437f1864 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Sun, 26 May 2013 01:18:43 +0200 Subject: [PATCH] Fixed dropFrames count --- Vocaluxe/Lib/Video/Acinerella/CDecoder.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Lib/Video/Acinerella/CDecoder.cs b/Vocaluxe/Lib/Video/Acinerella/CDecoder.cs index 81068a68..449b2cc3 100644 --- a/Vocaluxe/Lib/Video/Acinerella/CDecoder.cs +++ b/Vocaluxe/Lib/Video/Acinerella/CDecoder.cs @@ -286,7 +286,7 @@ namespace Vocaluxe.Lib.Video.Acinerella private void _Decode() { - const int framedropcount = 4; + const int minFrameDropCount = 4; if (_Paused || _NoMoreFrames) return; @@ -294,7 +294,7 @@ namespace Vocaluxe.Lib.Video.Acinerella float myTime = _Time + _Gap; float timeDifference = myTime - _LastDecodedTime; - bool dropFrame = timeDifference >= (framedropcount - 1) * _FrameDuration; + bool dropFrame = timeDifference >= (minFrameDropCount - 1) * _FrameDuration; if (_Terminated) return; @@ -304,7 +304,7 @@ namespace Vocaluxe.Lib.Video.Acinerella { try { - frameFinished = CAcinerella.AcSkipFrames(_Instance, _Videodecoder, framedropcount - 1); + frameFinished = CAcinerella.AcSkipFrames(_Instance, _Videodecoder, (int)(timeDifference / _FrameDuration)); } catch (Exception) {