lavr: fix handling of custom mix matrices
Adds some validation for changing parameters after setting the matrix and fixes a bug in the conversion path setup.
This commit is contained in:
parent
73486e3b61
commit
8821ae649e
3 changed files with 26 additions and 10 deletions
|
@ -48,9 +48,8 @@ int avresample_open(AVAudioResampleContext *avr)
|
|||
avr->resample_channels = FFMIN(avr->in_channels, avr->out_channels);
|
||||
avr->downmix_needed = avr->in_channels > avr->out_channels;
|
||||
avr->upmix_needed = avr->out_channels > avr->in_channels ||
|
||||
avr->am->matrix ||
|
||||
(avr->out_channels == avr->in_channels &&
|
||||
avr->in_channel_layout != avr->out_channel_layout);
|
||||
(!avr->downmix_needed && (avr->am->matrix ||
|
||||
avr->in_channel_layout != avr->out_channel_layout));
|
||||
avr->mixing_needed = avr->downmix_needed || avr->upmix_needed;
|
||||
|
||||
/* set resampling parameters */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue