Skip to content

Commit

Permalink
PLAT-7120-FIX-Insane-FPS
Browse files Browse the repository at this point in the history
Overlaod FPS if it is not set or insane
  • Loading branch information
anatolkaltura authored Apr 2, 2017
1 parent 99f832d commit cb25075
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions infra/media/mediaInfoParser/KMediaFileComplexity.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,17 @@ public function EvaluateSampled($sourceFilename, $sourceData, $complexityFilenam
if(!isset($this->scanType))
$this->scanType = $sourceData->scanType;

/*
* Limit the complexity evaluation FPS to 'reasonable' values,
* in order to avoid processing overloading in cases with huge/invalid FPS values.
*/
if(!isset($sourceData->videoFrameRate) || $sourceData->videoFrameRate>KDLSanityLimits::MaxFramerate){
$this->fps = KDLSanityLimits::MaxFramerate;
}
else if($sourceData->videoFrameRate==0){
$this->fps = KDLConstants::MaxFramerate;
}

/*
* Determine the sampling paramters
* - number of sumpling points
Expand Down

0 comments on commit cb25075

Please sign in to comment.