[vlc-devel] [PATCH] live555: fix the subtitles issue

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Mon Dec 30 10:58:40 CET 2013


When the user selects a subtitle track, pause the other sub-title tracks
instead of tearing them down. As the tearing down is normally reserved to
ending sessions, restarting a tore down track later on fails, whereas
restarting a paused track works.
---
 modules/access/live555.cpp |   17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index 88ddc2e..8e728f4 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -1137,6 +1137,7 @@ static int SessionsSetup( demux_t *p_demux )
                 es_format_Clean( &tk->fmt );
                 free( tk );
             }
+            
         }
     }
     delete iter;
@@ -1247,23 +1248,10 @@ static int Demux( demux_t *p_demux )
             if( !b && tk->b_selected )
             {
                 tk->b_selected = false;
-                p_sys->rtsp->sendTeardownCommand( *tk->sub, NULL );
+                p_sys->rtsp->sendPauseCommand( *tk->sub, NULL );
             }
             else if( b && !tk->b_selected)
             {
-                bool b_rtsp_tcp = var_GetBool( p_demux, "rtsp-tcp" ) ||
-                                  var_GetBool( p_demux, "rtsp-http" );
-                p_sys->rtsp->sendSetupCommand( *tk->sub, default_live555_callback, False,
-                                               toBool( b_rtsp_tcp ),
-                                               toBool( p_sys->b_force_mcast && !b_rtsp_tcp ) );
-                if( !wait_Live555_response( p_demux ) )
-                {
-                    msg_Err( p_demux, "SETUP of'%s/%s' failed %s",
-                             tk->sub->mediumName(), tk->sub->codecName(),
-                             p_sys->env->getResultMsg() );
-                }
-                else
-                {
                     p_sys->rtsp->sendPlayCommand( *tk->sub, default_live555_callback, -1, -1, p_sys->ms->scale() );
                     if( !wait_Live555_response(p_demux) )
                     {
@@ -1272,7 +1260,6 @@ static int Demux( demux_t *p_demux )
                     }
                     else
                         tk->b_selected = true;
-                }
                 if( !tk->b_selected )
                     es_out_Control( p_demux->out, ES_OUT_SET_ES_STATE, tk->p_es, false );
             }
-- 
1.7.10.4




More information about the vlc-devel mailing list