[vlc-commits] Correctly check the index in the pref. list when selecting the ES.
Denis Charmet
git at videolan.org
Mon Sep 30 21:21:34 CEST 2013
vlc/vlc-2.1 | branch: master | Denis Charmet <typx at dinauz.org> | Mon Sep 30 14:54:37 2013 +0200| [79a0196b415c4174d018b242fb56098b6b07d638] | committer: 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
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=79a0196b415c4174d018b242fb56098b6b07d638
---
src/input/es_out.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 6b0e9ad..c75c6db 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -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;
More information about the vlc-commits
mailing list