[vlc-devel] [PATCH 2/2] Fix subtitle loss at segment change.
Laurent Aimar
fenrir at elivagar.org
Tue Sep 6 21:26:59 CEST 2011
On Tue, Sep 06, 2011 at 12:24:49AM +0200, Denis Charmet wrote:
> ---
> src/input/es_out.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/src/input/es_out.c b/src/input/es_out.c
> index fe0f4f0..33443f4 100644
> --- a/src/input/es_out.c
> +++ b/src/input/es_out.c
> @@ -1856,11 +1856,15 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
> else if( p_sys->i_default_sub_id >= 0 )
> {
> if( es->i_id == p_sys->i_default_sub_id )
> + {
> i_wanted = es->i_channel;
> + }
> }
>
> if( p_sys->i_sub_last >= 0 )
> + {
> i_wanted = p_sys->i_sub_last;
> + }
>
> if( p_sys->i_sub_id >= 0 )
> {
> @@ -2084,6 +2088,7 @@ static void EsOutDel( es_out_t *out, es_out_id_t *es )
> if( p_sys->p_es_video == es ) p_sys->p_es_video = NULL;
> if( p_sys->p_es_sub == es ) p_sys->p_es_sub = NULL;
>
> +
> switch( es->fmt.i_cat )
> {
> case AUDIO_ES:
> @@ -2287,7 +2292,11 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
> p_sys->i_default_audio_id = es->i_id;
> else*/
> if( es->fmt.i_cat == SPU_ES )
> + {
> p_sys->i_default_sub_id = es->i_id;
> + EsOutSelect( out, es, false );
> + }
> +
I don't think that is valid sadly. The ES_OUT_SET_ES_DEFAULT is just here to
tell which track should be selected by default but should not override any user
choice.
Could you describe why you need this change ?
--
fenrir
More information about the vlc-devel
mailing list