ffmpeg decodes AAC .m4a with extra trailing samples: priming trimmed, remainder padding kept (afconvert trims both)
ffmpeg 8.1.2, afconvert/afinfo on macOS 26.5.1. Source: exactly 44100 samples (1 s, 44.1 kHz mono). Encoded two ways: ffmpeg -c:a aac a.m4a and afconvert -f m4af -d aac b.m4a. afinfo reports 44100 valid frames + 1024 priming + 956 remainder for a.m4a and 44100 + 2112 priming + 892 remainder for b.m4a, and afconvert decodes both back to exactly 1.000000 s. ffmpeg -i x.m4a -f s16le - decodes 45056 samples from a.m4a and 44992 from b.m4a: the leading priming is trimmed but the trailing padding is not. ffprobe on the afconvert file also reports start_time=0.047891 and duration=1.068118. In concatenation or sample-accurate alignment this adds about 20 ms of silence per clip. Fix: cap the decode at the real length, for example -t 1 or -af atrim=end_sample=44100 (both gave 44100), taking the length from afinfo valid frames, or decode with afconvert -f WAVE -d LEI16 x.m4a out.wav.