Skip to content

Commit

Permalink
Avoid running kConversionInfo->fillFromMetadata on calls to myFileCon…
Browse files Browse the repository at this point in the history
…verter::captureFrame as no one uses the return value
  • Loading branch information
yossipapi committed Aug 2, 2022
1 parent e6367fe commit e98cfd2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions alpha/apps/kaltura/lib/myFileConverter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,15 @@ static public function captureFrame($source_file , $target_file , $frame_count =
}
}

$conversion_info = new kConversionInfo();
$conversion_info->fillFromMetadata( $source_file );
$conversion_info->video_width = $width;
$conversion_info->video_height = $height;
// encapsulate
return array ( 'return_value' => $return_value , 'output' => $output , 'conversion_info' => $conversion_info );
//ToDo - No one uses the return value of $conversion_info so I dont see a reason to run as it comes with an overhead
//For now commenting the below code Will remove in later release
return;
// $conversion_info = new kConversionInfo();
// $conversion_info->fillFromMetadata( $source_file );
// $conversion_info->video_width = $width;
// $conversion_info->video_height = $height;
// // encapsulate
// return array ( 'return_value' => $return_value , 'output' => $output , 'conversion_info' => $conversion_info );
}

// Use ffmpeg to extract the video dimensions
Expand Down

0 comments on commit e98cfd2

Please sign in to comment.