Fixed dropFrames count
This commit is contained in:
1 parent
acb8862361
commit
b493a1f3d7
1 file changed
+3
-3
@@ -286,7 +286,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
|||||||
|
|
||||||
private void _Decode()
|
private void _Decode()
|
||||||
{
|
{
|
||||||
const int framedropcount = 4;
|
const int minFrameDropCount = 4;
|
||||||
|
|
||||||
if (_Paused || _NoMoreFrames)
|
if (_Paused || _NoMoreFrames)
|
||||||
return;
|
return;
|
||||||
@@ -294,7 +294,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
|||||||
float myTime = _Time + _Gap;
|
float myTime = _Time + _Gap;
|
||||||
float timeDifference = myTime - _LastDecodedTime;
|
float timeDifference = myTime - _LastDecodedTime;
|
||||||
|
|
||||||
bool dropFrame = timeDifference >= (framedropcount - 1) * _FrameDuration;
|
bool dropFrame = timeDifference >= (minFrameDropCount - 1) * _FrameDuration;
|
||||||
|
|
||||||
if (_Terminated)
|
if (_Terminated)
|
||||||
return;
|
return;
|
||||||
@@ -304,7 +304,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
frameFinished = CAcinerella.AcSkipFrames(_Instance, _Videodecoder, framedropcount - 1);
|
frameFinished = CAcinerella.AcSkipFrames(_Instance, _Videodecoder, (int)(timeDifference / _FrameDuration));
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user