refactor to use the nearest decoded frame, in the case the requested time is on the end of the video