I am trying to encode 7.1 audio in an aac codec in my program, but the codec only supports up to 6 channels and I get an error to that effect if I try to force it to use AV_CH_LAYOUT_7POINT1. However, ffmpeg (the utility) can do it. Can anyone guess what I am missing? -- Gonzalo Garramuño