clean up of ring buffer for hand-off to encoder.