Fixed codacy review warnings

This commit is contained in:
Brenno
2021-01-19 16:32:50 -03:00
parent f6de53350f
commit d481e5a75b
7 changed files with 19 additions and 16 deletions

View File

@@ -40,6 +40,8 @@ using google::protobuf::util::TimeUtil;
CVTracker::CVTracker(std::string processInfoJson, ProcessingController &processingController)
: processingController(&processingController), json_interval(false){
SetJson(processInfoJson);
start = 0;
end = 0;
}
// Set desirable tracker method
@@ -71,7 +73,7 @@ void CVTracker::trackClip(openshot::Clip& video, size_t _start, size_t _end, boo
if(!json_interval){
start = _start; end = _end;
if(!process_interval || end <= 0 || end-start <= 0){
if(!process_interval || end <= 0 || 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();