Move aspect ratio 0/0 avoidance code so the values in the sps struct are not missed.