Commit bb515401 authored by Denis Charmet's avatar Denis Charmet

Correctly check the index in the pref. list when selecting the ES.

The former check wasn't enough since a language that isn't in the table
has a -1 index.

Fix #9531
parent b1df5593
......@@ -1772,7 +1772,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
LanguageArrayIndex( p_sys->ppsz_audio_language,
p_sys->p_es_audio->psz_language_code );
if( es_idx >= 0 &&
( es_idx < selected_es_idx ||
( selected_es_idx < 0 || es_idx < selected_es_idx ||
( es_idx == selected_es_idx &&
p_sys->p_es_audio->fmt.i_priority < es->fmt.i_priority ) ) )
i_wanted = es->i_channel;
......@@ -1823,7 +1823,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
p_sys->p_es_sub->psz_language_code );
if( es_idx >= 0 &&
( es_idx < selected_es_idx ||
( selected_es_idx < 0 || es_idx < selected_es_idx ||
( es_idx == selected_es_idx &&
p_sys->p_es_sub->fmt.i_priority < es->fmt.i_priority ) ) )
i_wanted = es->i_channel;
......
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