Browse Source

lavr: call mix_function_init() in ff_audio_mix_set_matrix()

This is needed if a custom matrix is set by the user after opening the
AVAudioResampleContext because the matrix channel count can change if
different mixing coefficients are used.

CC:libav-stable@libav.org
tags/n1.2
Justin Ruggles 12 years ago
parent
commit
f07ef2d9c9
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      libavresample/audio_mix.c

+ 1
- 5
libavresample/audio_mix.c View File

@@ -422,10 +422,6 @@ AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr)
av_free(matrix_dbl); av_free(matrix_dbl);
} }


ret = mix_function_init(am);
if (ret < 0)
goto error;

return am; return am;


error: error:
@@ -704,5 +700,5 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }


return 0;
return mix_function_init(am);
} }

Loading…
Cancel
Save