Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
a5c6349358
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libswresample/rematrix.c

+ 2
- 1
libswresample/rematrix.c View File

@@ -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++){
switch(s->matrix_ch[out_i][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;
case 1:
in_i= s->matrix_ch[out_i][1];


Loading…
Cancel
Save