One of my friends recently completed his PhD and afterwards his examiners made it pretty clear that his viva performance was the reason he only got minor corrections (3 months) rather than major corrections. This is because he didn't include a discussion of some particular literature that they felt was important (he hadn't felt that it was relevant when writing his thesis). Because he could talk about it in the viva and explain the main issues they knew he understood it, hence less work to do.
I suppose on some occassions it might be decided before (i.e. it's a clear cut case) but I would suggest the viva is usually pretty important.