diff --git a/latmenc.c b/latmenc.c
--- a/latmenc.c
+++ b/latmenc.c
@@ -73,8 +73,26 @@
     }
     /* FIXME: are any formats not allowed in LATM? */
 
+    /* The answer to the FIXME question is "Yes".
+
+       It depends upon the final file format.
+
+       For DVB (container mpegts with system_b flags set) the relevant specification is
+       ETSI TS 101 154 namly "6.4.1 LATM/LOAS formatting
+       ...
+       The MPEG-4 HE AAC or HE AAC v2 elementary stream data shall be first encapsulated in the LATM multiplex format
+       according to ISO/IEC 14496-3 [17].
+
+       The MPEG-4 AAC/MPEG Surround, MPEG-4 HE AAC/MPEG Surround and MPEG-4 HE AAC
+       v2/MPEG Surround elementary streams shall be formatted with AudioMuxElement() LATM
+       multiplex format, and AudioSyncStream() LOAS transmission format.
+       ...
+       In case of the combination MPEG-4 AAC with MPEG Surround, the Audio Object Type (AOT)
+       element, audioObjectType, shall be set to the value 2 (indicating AAC-LC).
+
+       In case of the combination MPEG-4 HE AAC with MPEG Surround or the combination of MPEG-4
+       HE AAC v2 with MPEG Surround, the Audio Object Type (AOT) element, audioObjectType, shall
+       be set to the value 5 (indicating SBR).
+       ...".
+       The first sentence specifies what MUST be encoded in this format.
+       The second sentence specifies what CAN be encoded in this format.
+       The other two sentences are clarifications of field values.
+
+       For ATSC (container mpegts with system_b flags NOT set) and the various mpeg4 file formats the relevant specifications
+       need to be found and the equivalent information located. */
+
     if (m4ac.object_type > AOT_SBR && m4ac.object_type != AOT_ALS) {
         av_log(s, AV_LOG_ERROR, "Muxing MPEG-4 AOT %d in LATM is not supported\n", m4ac.object_type);
+
+        /* The following statement can be reached from the public API by using profile "aac_he" or "aac_he_v2" for aac encoding.
+           These profiles can not be selected for the native aac encoder from ffmpeg itself. If the following statement
+           is commented out the output is valid. However this is undocumented (possibly unintentional) behaviour.
+           I can see equal merit in leaving the code "as is" until the FIXME above is done or commenting it out
+           as a workaround until that time (as this still makes "complaints" to the log but does not stop execution). */
         return AVERROR_INVALIDDATA;
     }
     ctx->channel_conf = m4ac.chan_config;
