summaryrefslogtreecommitdiff
path: root/libswresample/audioconvert.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-24 22:52:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-24 23:19:32 +0200
commit97599f8c6d078868be30c18516899325d3c053c2 (patch)
tree77d60e63431f1ffdd290b04ebcf81f4ec9a95ca1 /libswresample/audioconvert.c
parent5dc73634469dc54e109fe0fd9f3fc0c24409e548 (diff)
downloadffmpeg-97599f8c6d078868be30c18516899325d3c053c2.tar.gz
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 <michaelni@gmx.at>
Diffstat (limited to 'libswresample/audioconvert.c')
-rw-r--r--libswresample/audioconvert.c1
1 files changed, 1 insertions, 0 deletions
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;