[FFmpeg-devel] [RFC] lavfi audio buffers and channel layout

Nicolas George nicolas.george at normalesup.org
Mon Jul 30 18:27:17 CEST 2012

Le tridi 13 thermidor, an CCXX, Stefano Sabatini a écrit :
> Possible solutions: we validate the channel layout when opening the
> movie, if we can guess the channel layout from the number of channels,
> we warn and set it in the decoder context. In case we can't map
> nb_channels -> channel layout we just complain and fail.

That is what ffmpeg does: guess_input_channel_layout().

> I don't know if this is a good idea, since we require the filtergraph
> to be set up with a defined channel layout, and introducing a
> nb_channels we may trigger possible inconsistencies in the filtergraph
> (in case nb_channels doesn't match with the channel layout).

Risks of inconsistencies are always bad.

Also, IMHO, it is not a good idea to let people be too sloppy with channel
layouts, because that kind of bugs is very annoying and quite hard to debug.
So getting them to at least know there may be a problem by making them use a
channel_layout mask instead of simply a number of channels is probably


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120730/5ed47b4b/attachment.asc>

More information about the ffmpeg-devel mailing list