Commit c4b02844 authored by Thomas Guillem's avatar Thomas Guillem

aout: keep initial "stereo-mode" value set by options

parent a9fcd603
......@@ -83,6 +83,8 @@ typedef struct
bool discontinuity;
} sync;
int initial_stereo_mode; /**< Initial stereo mode set by options */
audio_sample_format_t input_format;
audio_sample_format_t mixer_format;
......
......@@ -83,7 +83,7 @@ int aout_DecNew( audio_output_t *p_aout,
owner->request_vout = *p_request_vout;
var_Change (p_aout, "stereo-mode", VLC_VAR_SETVALUE,
&(vlc_value_t) { .i_int = AOUT_VAR_CHAN_UNSET }, NULL);
&(vlc_value_t) { .i_int = owner->initial_stereo_mode }, NULL);
owner->filters_cfg = AOUT_FILTERS_CFG_INIT;
if (aout_OutputNew (p_aout, &owner->mixer_format, &owner->filters_cfg))
......
......@@ -336,6 +336,8 @@ audio_output_t *aout_New (vlc_object_t *parent)
/* Stereo mode */
var_Create (aout, "stereo-mode", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
owner->initial_stereo_mode = var_GetInteger (aout, "stereo-mode");
var_AddCallback (aout, "stereo-mode", StereoModeCallback, NULL);
vlc_value_t txt;
txt.psz_string = _("Stereo audio mode");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment