Remove redundant code. Calculate port buffer offsets from start
frame instead of end frame.