+
+static av_cold int Faac_encode_close(AVCodecContext *avctx)
+{
+ FaacAudioContext *s = avctx->priv_data;
+
+#if FF_API_OLD_ENCODE_AUDIO
+ av_freep(&avctx->coded_frame);
+#endif
+ av_freep(&avctx->extradata);
+ ff_af_queue_close(&s->afq);
+
+ if (s->faac_handle)
+ faacEncClose(s->faac_handle);
+
+ return 0;
+}
+
+static const int channel_maps[][6] = {
+ { 2, 0, 1 }, //< C L R
+ { 2, 0, 1, 3 }, //< C L R Cs
+ { 2, 0, 1, 3, 4 }, //< C L R Ls Rs
+ { 2, 0, 1, 4, 5, 3 }, //< C L R Ls Rs LFE
+};
+