> On Mar 24, 2016, at 03:55, Carl Eugen Hoyos <ceho...@ag.or.at> wrote:
> 
> Rodger Combs <rodger.combs <at> gmail.com> writes:
> 
>> - Channel layouts were never exported
>> - Channel mappings were incorrect beyond stereo
> 
> What happens if you don't pass a channel layout?
> Does the encoder work? Does it return a channel 
> layout?

Oh, I thought lavc set a default channel layout if one wasn't specified, but it 
looks like that's not the case (it's ffmpeg_filter that does that).
Fixed with this patch:
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -271,6 +271,9 @@ static av_cold int ffat_init_encoder(AVCodecContext *avctx)
         return AVERROR_UNKNOWN;
     }
 
+    if (!avctx->channel_layout)
+        avctx->channel_layout = av_get_default_channel_layout(avctx->channels);
+
     if ((status = remap_layout(channel_layout, avctx->channel_layout, 
avctx->channels)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "Invalid channel layout\n");
         av_free(channel_layout);

This will error if the user passes an unsupported channel layout (e.g. 
5POINT1_BACK or 7POINT1); this seems to be the usual behavior.

> Does the AAC encoder support more than one channel 
> layout for a given number of input channels?

Yes; see the aac_at_channel_layouts array.

> 
> Carl Eugen
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to