mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-03 11:07:41 +00:00
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
(cherry picked from commit f07ef2d9c9
)
Conflicts:
libavresample/audio_mix.c
This commit is contained in:
parent
a856623e87
commit
d7e7e12abc
@ -401,10 +401,6 @@ AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr)
|
||||
av_free(matrix_dbl);
|
||||
}
|
||||
|
||||
ret = mix_function_init(am);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
return am;
|
||||
|
||||
error:
|
||||
@ -544,8 +540,5 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
/* TODO: detect situations where we can just swap around pointers
|
||||
instead of doing matrix multiplications with 0.0 and 1.0 */
|
||||
|
||||
return 0;
|
||||
return mix_function_init(am);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user