From 97599f8c6d078868be30c18516899325d3c053c2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 24 Sep 2012 22:52:36 +0200 Subject: swr: make sure the last data element is NULL so we can use it to detect the number of channels Signed-off-by: Michael Niedermayer --- libswresample/audioconvert.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libswresample/audioconvert.c') diff --git a/libswresample/audioconvert.c b/libswresample/audioconvert.c index 2e5bd72234..d2e3722a40 100644 --- a/libswresample/audioconvert.c +++ b/libswresample/audioconvert.c @@ -179,6 +179,7 @@ int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len off = len&~15; av_assert1(off>=0); av_assert1(off<=len); + av_assert2(ctx->channels == SWR_CH_MAX || !in->ch[ctx->channels]); if(off>0){ if(out->planar == in->planar){ int planes = out->planar ? out->ch_count : 1; -- cgit v1.2.3