vlc | branch: master | Francois Cartegnie <[email protected]> | Thu Jul 2 20:00:44 2020 +0200| [3dffc000ba005c6fd9b0379f28b220173a2bd0b6] | committer: Francois Cartegnie
input: es_out: fix SET_DEFAULT regression refs #24924 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3dffc000ba005c6fd9b0379f28b220173a2bd0b6 --- src/input/es_out.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/input/es_out.c b/src/input/es_out.c index 0280939751..483f3494d4 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -2403,13 +2403,8 @@ static void EsOutUnselectEs( es_out_t *out, es_out_id_t *es, bool b_update ) static bool EsOutSelectMatchPrioritized( const es_out_es_props_t *p_esprops, const es_out_id_t *es ) { - /* If demux has specified a default track */ - if( p_esprops->i_demux_id >= 0 ) - { - return ( es->fmt.i_id == p_esprops->i_demux_id ); - } /* Otherwise, fallback by priority */ - else if( p_esprops->p_main_es != NULL ) + if( p_esprops->p_main_es != NULL ) { return ( es->fmt.i_priority > p_esprops->p_main_es->fmt.i_priority ); } @@ -2564,6 +2559,14 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) } } + /* If demux has specified a default active track */ + if( wanted_es == NULL && + p_esprops->i_demux_id >= 0 && + p_esprops->i_demux_id == es->fmt.i_id ) + { + wanted_es = es; + } + /* If there is no user preference, select the default track * or adapt by ES priority */ if( b_auto_selected && wanted_es == NULL && _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
