af_channelmap: fix number of channels

Fixes segfaults with the following command:

ffmpeg -f lavfi -i aevalsrc=0:c=stereo:n=1920 -af 'channelmap=0' test.ac3

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Marton Balint 2015-03-28 10:07:07 +01:00 committed by Michael Niedermayer
parent 048b6331e0
commit 625bd463cd
1 changed files with 1 additions and 0 deletions

View File

@ -348,6 +348,7 @@ static int channelmap_filter_frame(AVFilterLink *inlink, AVFrame *buf)
FFMIN(FF_ARRAY_ELEMS(buf->data), nch_out) * sizeof(buf->data[0]));
buf->channel_layout = outlink->channel_layout;
av_frame_set_channels(buf, outlink->channels);
return ff_filter_frame(outlink, buf);
}