Mean Look lasts the entire battle until the Mean Looked Pokemon comes out of battle, if by fainting, switching out etc.. If the user uses a move that switches itself out however, like Baton Pass, Roar and Whirlwind, Mean Look will be in effect on the newly switched-out Pokemon. Past Gen V though, moves like this disabled the effects of Mean Look.
Hope I helped. :)