Videos use their own codecs (like you said). Then normally do not use lossless audio though.
I do want to clarify one other thing though. If the headphones don't support something like AAC, APTX will, and can, step in and be used as a codec (the AAC would be converted to work in real time). You won't get a loss in quality, but if AAC is supported, that codec will be used instead (you won't get a loss in quality, but no conversion will be required).