From c5c355546deeae961363aa6893f4e5b3a0b0f790 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 19 May 2012 17:47:06 +0200 Subject: [PATCH] swr: add some asserts to resample() These check that the internal and input buffers match in format Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 245a85b790..d8a066f072 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -419,6 +419,10 @@ static int resample(SwrContext *s, AudioData *out_param, int out_count, int ret_sum=0; int border=0; + av_assert1(s->in_buffer.ch_count == in_param->ch_count); + av_assert1(s->in_buffer.planar == in_param->planar); + av_assert1(s->in_buffer.fmt == in_param->fmt); + tmp=out=*out_param; in = *in_param;