aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-19 17:45:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-19 19:23:37 +0200
commit5027e3daf7b6046f3ced310fecf642dddc0b45b9 (patch)
treede37ca88854ce257d89aab6fcf64c3729feaae47
parentbdbfd4569dde7ce3e82dcaf36e794a978266cf95 (diff)
downloadffmpeg-5027e3daf7b6046f3ced310fecf642dddc0b45b9.tar.gz
swr: fix buf_set() so it works with input == output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswresample/swresample.c2
1 files changed, 1 insertions, 1 deletions
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; ch<out->ch_count; ch++)
out->ch[ch]= in->ch[ch] + count*out->bps;
}else{
- for(ch=0; ch<out->ch_count; ch++)
+ for(ch=out->ch_count-1; ch>=0; ch--)
out->ch[ch]= in->ch[0] + (ch + count*out->ch_count) * out->bps;
}
}