[vlc-devel] [PATCH 1/3] input: es_out: split es selection matching functions

Rémi Denis-Courmont remi at remlab.net
Mon Jun 15 17:51:00 CEST 2020


Le maanantaina 15. kesäkuuta 2020, 18.34.03 EEST Francois Cartegnie a écrit :
> Le 15/06/2020 à 17:31, Rémi Denis-Courmont a écrit :
> > Le maanantaina 15. kesäkuuta 2020, 16.15.41 EEST Francois Cartegnie a 
écrit :
> >> @@ -2543,16 +2566,11 @@ static void EsOutSelect( es_out_t *out,
> >> es_out_id_t
> >> *es, bool b_force ) }
> >> 
> >>          /* If there is no user preference, select the default subtitle
> >>          
> >>           * or adapt by ES priority */
> >> 
> >> -        else if( p_esprops->i_demux_id >= 0 && es->fmt.i_id ==
> >> p_esprops->i_demux_id ) +        else if( b_auto_selected &&
> >> +                 EsOutSelectMatchPrioritized( p_esprops, es ) )
> >> 
> >>          {
> >>          
> >>              wanted_es = es;
> >>          
> >>          }
> >> 
> >> -        else if( p_esprops->p_main_es == NULL ||
> >> -                 es->fmt.i_priority >
> >> p_esprops->p_main_es->fmt.i_priority
> >> ) -        {
> >> -            if( b_auto_selected )
> >> -                wanted_es = es;
> >> -        }
> 
> demux_id is the 'default' ES set by demuxer (can be achieved with
> priority, but that's not the really the same usage) and we have to
> consider non exclusive ES selection.

Still, if a rule does not match any ES, it makes sense to fall back to the 
next rule. But if a rule matches *another* existing ES, falling back like this 
does not seem right. This means we end up with more than one matching ES.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list