You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed FPS ToInt() conversion and changed initial frame number to 1
This commit is contained in:
@@ -78,10 +78,10 @@ void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start,
|
||||
setProcessingDevice();
|
||||
|
||||
size_t frame_number;
|
||||
if(!process_interval || end == 0 || end-start == 0){
|
||||
if(!process_interval || end <= 1 || end-start == 0){
|
||||
// Get total number of frames in video
|
||||
start = video.Start() * video.Reader()->info.fps.ToInt();
|
||||
end = video.End() * video.Reader()->info.fps.ToInt();
|
||||
start = (int)(video.Start() * video.Reader()->info.fps.ToFloat()) + 1;
|
||||
end = (int)(video.End() * video.Reader()->info.fps.ToFloat()) + 1;
|
||||
}
|
||||
|
||||
for (frame_number = start; frame_number <= end; frame_number++)
|
||||
|
||||
Reference in New Issue
Block a user