You can either use a spit coat of shellac to cover them, or you can use Zinnser primer. This is an alcohol based shellac primer that is excellent for coating things like fire damage, knots, and stains that can bleed through to the finish coat. Follow the directions on the can (I think one coat may suffice, but maybe two coats is necessary with pine) and then 2 coats of your paint. I'm not affiliated with the product, but have used it with great success.
One caveat, use it in a well ventilated area. It is alcohol based, so it is pretty noxious.