Correct video quality recalculation

The video quality was incorrect when the prefer quality does not
existed.