mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:56:31 +00:00
fix ai detection bugs #2
This commit is contained in:
@@ -106,7 +106,7 @@ public class VLCFrameExtractor(LibVLC libVLC)
|
||||
|
||||
if (_frameCounter > 20 && _frameCounter % 10 == 0)
|
||||
{
|
||||
var msToAdd = (_frameCounter - _lastFrame) * (_lastFrameTimestamp.TotalMilliseconds / _lastFrame);
|
||||
var msToAdd = (_frameCounter - _lastFrame) * (_lastFrame == 0 ? 0 : _lastFrameTimestamp.TotalMilliseconds / _lastFrame);
|
||||
var time = _lastFrameTimestamp.Add(TimeSpan.FromMilliseconds(msToAdd));
|
||||
FramesQueue.Enqueue(new FrameInfo(time, _currentBitmap));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user