> I don't really understand what you mean here. AE uses the m_channelLayout to detect what channels are there in the input stream and what their positions are, no?

no. AE uses swresample and ffmpeg channel mask. The first 2 bits define FL/FR so those are always at the first positions. You only can swap channels by rematrixing with a custom matrix. This is done at the last stage before handing over to the sink.

If you want to swap channels here, you have to rematrix. aac is decoded to float planar -> a rematrx right after decoder could be done at almost no cost.