[vlc-devel] [PATCH 2/2] Fix subtitle loss at segment change.

Denis Charmet typx at dinauz.org
Tue Sep 6 00:24:49 CEST 2011


---
 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 );
+                }
+
             }
             return VLC_SUCCESS;
         }
-- 
1.7.5.4




More information about the vlc-devel mailing list