[vlc-commits] trivial: accept different chan_modes
Thomas Guillem
git at videolan.org
Mon Mar 5 11:55:11 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Mar 5 10:16:04 2018 +0100| [5fe8df87ab248cc4b7d788a7b3a719a1074060d3] | committer: Thomas Guillem
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
(cherry picked from commit 31e11f5bedef66b70b7853d3d11cebf5a2d235cc)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5fe8df87ab248cc4b7d788a7b3a719a1074060d3
---
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;
More information about the vlc-commits
mailing list