Commit a5c63493 authored by Michael Niedermayer's avatar Michael Niedermayer

swr: skip memset(0) in rematrix when the array is known to be already 0

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 75d900d5
...@@ -362,7 +362,8 @@ int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mus ...@@ -362,7 +362,8 @@ int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mus
for(out_i=0; out_i<out->ch_count; out_i++){ for(out_i=0; out_i<out->ch_count; out_i++){
switch(s->matrix_ch[out_i][0]){ switch(s->matrix_ch[out_i][0]){
case 0: case 0:
memset(out->ch[out_i], 0, len * av_get_bytes_per_sample(s->int_sample_fmt)); if(mustcopy)
memset(out->ch[out_i], 0, len * av_get_bytes_per_sample(s->int_sample_fmt));
break; break;
case 1: case 1:
in_i= s->matrix_ch[out_i][1]; in_i= s->matrix_ch[out_i][1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment