Added helper method for calculating expected keyframe offset