[vlc-devel] [PATCH 1/2] es_out: really restart es with ES_OUT_RESTART_ES

Rémi Denis-Courmont remi at remlab.net
Tue Jun 16 20:05:18 CEST 2015


Le 2015-06-16 19:24, Francois Cartegnie a écrit :
> if an es is passed and is not a category es,
> it is never restarted, just selected.
> ---
>  src/input/es_out.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/input/es_out.c b/src/input/es_out.c
> index 3756b14..3704e4c 100644
> --- a/src/input/es_out.c
> +++ b/src/input/es_out.c
> @@ -2214,7 +2214,15 @@ static int EsOutControlLocked( es_out_t *out,
> int i_query, va_list args )
>              {
>                  if( es == p_sys->es[i] )
>                  {
> -                    EsOutSelect( out, es, true );
> +                    if( i_query == ES_OUT_RESTART_ES &&
> p_sys->es[i]->p_dec )
> +                    {
> +                        EsDestroyDecoder( out, p_sys->es[i] );
> +                        EsCreateDecoder( out, p_sys->es[i] );
> +                    }

Maybe the ifs should be refactored so that there is only one pair of 
Destroy/Create in the loop?

> +                    else if( i_query == ES_OUT_SET_ES )
> +                    {
> +                        EsOutSelect( out, es, true );
> +                    }
>                      break;
>                  }
>              }

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list