From 31e11f5bedef66b70b7853d3d11cebf5a2d235cc Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Mon, 5 Mar 2018 10:16:04 +0100 Subject: [PATCH] trivial: accept different chan_modes This fixes a regression from 91f426996c98642b5180bb7375b188c93b2701ea This regressions caused the audio converter chain to fail when a chan_mode conversion was needed but no converter were found. In the case of AOUT_CHANMODE_DOLBYSTEREO. The dolby converter won't work with a stereo output. The lowest priority converter still need to handle this conversion and drop the chan_mode conversion. Fixes #19646 --- modules/audio_filter/channel_mixer/trivial.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c index b3ef079902..746934cbed 100644 --- a/modules/audio_filter/channel_mixer/trivial.c +++ b/modules/audio_filter/channel_mixer/trivial.c @@ -193,7 +193,12 @@ static int Create( vlc_object_t *p_this ) || infmt->i_rate != outfmt->i_rate || infmt->i_format != VLC_CODEC_FL32 ) return VLC_EGENERIC; - if( infmt->i_physical_channels == outfmt->i_physical_channels ) + + /* trivial is the lowest priority converter: if chan_mode are different + * here, this filter will still need to convert channels (and ignore + * chan_mode). */ + if( infmt->i_physical_channels == outfmt->i_physical_channels + && infmt->i_chan_mode == outfmt->i_chan_mode ) return VLC_EGENERIC; p_filter->p_sys = NULL; -- 2.11.4.GIT