A search is presented for direct top-squark pair production in final states with two leptons (electrons or muons) of opposite charge using 20.3 fb(-1) of pp collision data at root s = 8 TeV, collected by the ATLAS experiment at the Large Hadron Collider in 2012. No excess over the Standard Model expectation is found. The results are interpreted under the separate assumptions (i) that the top squark decays to a b-quark in addition to an on-shell chargino whose decay occurs via a real or virtual W boson, or (ii) that the top squark decays to a t-quark and the lightest neutralino. A top squark with a mass between 150 GeV and 445 GeV decaying to a b-quark and an on-shell chargino is excluded at 95% confidence level for a top squark mass equal to the chargino mass plus 10 GeV, in the case of a 1 GeV lightest neutralino. Top squarks with masses between 215 (90) GeV and 530 (170) GeV decaying to an on-shell (off-shell) t-quark and a neutralino are excluded at 95% confidence level for a 1 GeV neutralino.