summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-19 17:47:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-19 19:23:37 +0200
commitc5c355546deeae961363aa6893f4e5b3a0b0f790 (patch)
tree0219a122fc4e8d98061a3e67e8f250fc8dae6992 /libswresample
parent75e25f85407ac3a0ca92df342be2bd53724feae3 (diff)
downloadffmpeg-c5c355546deeae961363aa6893f4e5b3a0b0f790.tar.gz
swr: add some asserts to resample()
These check that the internal and input buffers match in format Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/swresample.c4
1 files changed, 4 insertions, 0 deletions
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;