Improve skipping

This commit is contained in:
Flamefire committed 2014-03-12 16:43:03 +01:00
1 parent cc35e7fd66
commit 26564874e9
1 file changed
+3 -2
@@ -1,5 +1,4 @@
using System; using System;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
@@ -328,7 +327,9 @@ namespace Vocaluxe.Lib.Video.Acinerella
{ {
try try
{ {
var frameDropCount = (int)(timeDifference / _FrameDuration); var frameDropCount = (int)Math.Ceiling(timeDifference / _FrameDuration);
// Add 1 dropped frame per 16 frames (Power of 2 -> Div is fast) as skipping takes time too and we don't want to skip again
frameDropCount += frameDropCount / 16;
hasFrameDecoded = CAcinerella.AcSkipFrames(_Instance, _Videodecoder, frameDropCount); hasFrameDecoded = CAcinerella.AcSkipFrames(_Instance, _Videodecoder, frameDropCount);
} }
catch (Exception) catch (Exception)