summaryrefslogtreecommitdiff
path: root/libavfilter/src_buffer.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-12-30 15:15:50 +0100
committerNicolas George <nicolas.george@normalesup.org>2013-01-01 02:01:28 +0100
commit2eb2e1798eeea155399197aeb0d8ed9f17d1eb0b (patch)
tree770173d1ea91efcb9a91e1bdd9b0a2a9dbdd2fe6 /libavfilter/src_buffer.c
parentf105fe5c22c5b7f426f65d82bee0de47c14bad65 (diff)
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.
Diffstat (limited to 'libavfilter/src_buffer.c')
-rw-r--r--libavfilter/src_buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/src_buffer.c b/libavfilter/src_buffer.c
index acd490b974..a9970345ec 100644
--- a/libavfilter/src_buffer.c
+++ b/libavfilter/src_buffer.c
@@ -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,