If the urine is in an upstairs floor, you have to be certain that the smell isn't coming through the floor into the downstairs.
Other than that, if it is dog urine or human urine, a really good coat of any paint should seal the smell in. Cat is a maybe, maybe not.
I suggest that you give the stains a good soak with an enzyme cleaner, let it dry, and then paint.
Paint is cheap enough so you don't lose anything by trying. Let the paint dry and then take a friend with a sensitive nose into the house and see if they can smell pet odors. You want to be sure before you replace the flooring over it.
Check behind the baseboards. There is often urine there. Dog can be washed off and sealed. Cat will probably have to have the bottom of the wallboard replaced.
If there are heating vents in the floor, wash those.
A lot of people won't notice faint dog smell, but everybody seems to be able to detect even the slightest smell of cat, so you have to be sure to get it all.