def _update_scene_fps(context, report, bvh_frame_time):
    """Update the scene's FPS settings from the BVH, but only if the BVH contains enough info."""
    if bvh_frame_time == 0.0:
        report({'WARNING'},
            'Unable to update scene frame rate, as the BVH file contains a zero frame duration in its MOTION section'
            )
        return
    scene = context.scene
    scene_fps = scene.render.fps / scene.render.fps_base
    new_fps = 1.0 / bvh_frame_time
    if scene.render.fps != new_fps or scene.render.fps_base != 1.0:
        print('\tupdating scene FPS (was %f) to BVH FPS (%f)' % (scene_fps,
            new_fps))
    scene.render.fps = new_fps
    scene.render.fps_base = 1.0
