lavfi: add avfilter_get_audio_buffer_ref_from_arrays_channels.

It is the same as avfilter_get_audio_buffer_ref_from_arrays
except it has a "channels" and the channel layout can be 0.
This commit is contained in:
Nicolas George
2012-12-30 15:15:50 +01:00
parent f105fe5c22
commit 2eb2e1798e
4 changed files with 56 additions and 12 deletions

View File

@@ -81,6 +81,8 @@ int av_asrc_buffer_add_samples(AVFilterContext *ctx,
{
AVFilterBufferRef *samplesref;
if (!channel_layout)
return AVERROR(EINVAL);
samplesref = avfilter_get_audio_buffer_ref_from_arrays(
data, linesize[0], AV_PERM_WRITE,
nb_samples,