It only
guarantees sample-accurate gapless with the headers, but the heuristics used on files without the headers are actually pretty good in practice.
Point being that it would be nice if the standard had the ability to encode arbitrary-length audio. (Well, without intentionally blank samples. Even CDs have to be in quanta of 44100ths of a second.) It's the spec that should have the fail attached to it in this case, IMO.
CDs have to be in quanta of 75ths of a second: track breaks can only come at frame boundaries. And while in a sense the MP3 spec does come with built-in fail, other formats (Vorbis, FLAC, WMA) can encode arbitrary-length audio, and any added fail there is purely proprietary. I'm not sure about AAC; the
Wikipedia article groups it with MP3 in the post-hoc-hacks list.
Peter