[vlc-commits] aout: no "stereo-mode" for mono inputs

Thomas Guillem git at videolan.org
Tue Apr 17 09:00:37 CEST 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Apr 16 09:59:59 2018 +0200| [e5d180343641af85f8ffb957a95a20859fb4b842] | committer: Thomas Guillem

aout: no "stereo-mode" for mono inputs

(cherry picked from commit 6498cfa126f2ba3dd0a1227aae9d34348bbfb4f4)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=e5d180343641af85f8ffb957a95a20859fb4b842
---

 src/audio_output/output.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 0549de044d..a1294110be 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -412,15 +412,12 @@ static void aout_PrepareStereoMode (audio_output_t *aout,
     vlc_value_t val, txt, default_val = { .i_int = AOUT_VAR_CHAN_UNSET };
     val.i_int = 0;
 
-    if (!AOUT_FMT_LINEAR(fmt))
+    if (!AOUT_FMT_LINEAR(fmt) || i_nb_input_channels == 1)
         return;
 
-    if (i_nb_input_channels > 1)
-    {
-        val.i_int = AOUT_VAR_CHAN_MONO;
-        txt.psz_string = _("Mono");
-        var_Change (aout, "stereo-mode", VLC_VAR_ADDCHOICE, &val, &txt);
-    }
+    val.i_int = AOUT_VAR_CHAN_MONO;
+    txt.psz_string = _("Mono");
+    var_Change (aout, "stereo-mode", VLC_VAR_ADDCHOICE, &val, &txt);
 
     if (i_nb_input_channels != 2)
     {



More information about the vlc-commits mailing list