[vlc-devel] [PATCH 1/2] input: es_out: fix SET_DEFAULT regression
Thomas Guillem
thomas at gllm.fr
Thu Jul 2 21:13:46 CEST 2020
Sset LGTM
On Thu, Jul 2, 2020, at 20:13, Francois Cartegnie wrote:
> refs #24924
> ---
> 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 &&
> --
> 2.25.4
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list