From 5027e3daf7b6046f3ced310fecf642dddc0b45b9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 19 May 2012 17:45:41 +0200 Subject: [PATCH] swr: fix buf_set() so it works with input == output Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index dbc502ff6c..619c83eb88 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -394,7 +394,7 @@ static void buf_set(AudioData *out, AudioData *in, int count){ for(ch=0; chch_count; ch++) out->ch[ch]= in->ch[ch] + count*out->bps; }else{ - for(ch=0; chch_count; ch++) + for(ch=out->ch_count-1; ch>=0; ch--) out->ch[ch]= in->ch[0] + (ch + count*out->ch_count) * out->bps; } }