[FFmpeg-devel] [PATCH] af_channelmap: fix number of channels

Michael Niedermayer michaelni at gmx.at
Sat Mar 28 03:58:48 CET 2015


On Sat, Mar 28, 2015 at 01:23:40AM +0100, Marton Balint wrote:
> 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 at passwd.hu>
> ---
>  libavfilter/af_channelmap.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
> index cc66f04..65a29f6 100644
> --- a/libavfilter/af_channelmap.c
> +++ b/libavfilter/af_channelmap.c
> @@ -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;
> +    buf->channels = outlink->channels;

this should be using av_frame_set_channels()


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150328/2dce2739/attachment.asc>


More information about the ffmpeg-devel mailing list