I've been told that *.aac files are currently reported as audio/mp4 mimetype; this seems to related to the mpeg4 container (ISO Media, QuickTime, whatever you call it today) used widely by iTunes, that does quite often contain AAC audio streams (but not limited to, iTunes can generate ALAC streams in m4a container). Raw AAC files with .aac extensions are not usually contained in MP4 format, they are, as the name suggests, raw streams, and should then not be reported as being in mp4 format. There is no neat magic data to identify a file as a raw AAC stream; xine-lib does use some content detection but it's not 100% safe and it often have false positives. Furthermode, AAC streams often have ID3 tags at their start (as they are considered a "successor" of MP3, so false positives from many MP3 magics are possible (file(1) does suffer from that).
I know it's not strictly correct to have raw AAC files discovered as MPEG-4 files, but it's also true that most .aac files are actually MPEG-4 containers with audio. We're doing the best with what's at hand, and I'm not sure how else we should be handling it when there's absolutely no magic available.
Where do you see .aac files that are actually MP4 files? Those are usually .m4a, I haven't seen even one of those mis-extended.
commit 88296cf92e716ee9dba0c60a7eeb2e9d46f2c951 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Feb 13 12:04:49 2013 +0100 Split off the AAC mime-type from the M4A one https://bugs.freedesktop.org/show_bug.cgi?id=13817
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.