This line has compiler-dependent behavior https://github.com/aizvorski/h264bitstream/blob/d8e53fdaa866aff3c987a331d522044c92f37935/bs.h#L203 Found by @LostInKadath https://github.com/aizvorski/h264bitstream/pull/51#issuecomment-1798000840 (Probably gcc does what is intended here and clang on 64bit platforms is bugged)