lavfi: support unknown channel layouts.

This commit is contained in:
Nicolas George 2013-01-02 15:11:30 +01:00
parent fccd8c21c4
commit b6afb2dde1
5 changed files with 184 additions and 19 deletions

View file

@ -44,7 +44,7 @@ AVFilterBufferRef *ff_default_get_audio_buffer(AVFilterLink *link, int perms,
AVFilterBufferRef *samplesref = NULL;
uint8_t **data;
int planar = av_sample_fmt_is_planar(link->format);
int nb_channels = av_get_channel_layout_nb_channels(link->channel_layout);
int nb_channels = link->channels;
int planes = planar ? nb_channels : 1;
int linesize;
int full_perms = AV_PERM_READ | AV_PERM_WRITE | AV_PERM_PRESERVE |