Handles multiple frames per buffer.