[vlc-devel] [PATCH 2/3] input: es_out: fix impossible commandline selection of not defaultable tracks
Francois Cartegnie
fcvlcdev at free.fr
Mon Jun 15 15:15:42 CEST 2020
---
src/input/es_out.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index c1c9615195..6f8daef7e3 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2409,11 +2409,15 @@ static bool EsOutSelectMatchPrioritized( const es_out_es_props_t *p_esprops,
return true;
}
/* Otherwise, fallback by priority */
- else if( p_esprops->p_main_es == NULL ||
+ else if( p_esprops->p_main_es != NULL &&
es->fmt.i_priority > p_esprops->p_main_es->fmt.i_priority )
{
return true;
}
+ else if( es->fmt.i_priority > ES_PRIORITY_NOT_DEFAULTABLE )
+ {
+ return true;
+ }
return false;
}
@@ -2460,10 +2464,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
{
es_out_sys_t *p_sys = container_of(out, es_out_sys_t, out);
es_out_es_props_t *p_esprops = GetPropsByCat( p_sys, es->fmt.i_cat );
-
- if( !p_esprops || !p_sys->b_active ||
- ( !b_force && es->fmt.i_priority < ES_PRIORITY_SELECTABLE_MIN ) ||
- !es->p_pgrm )
+ if( !p_esprops || !p_sys->b_active || !es->p_pgrm )
{
return;
}
--
2.25.4
More information about the vlc-devel
mailing list