]> git.sesse.net Git - vlc/blobdiff - modules/access/live555.cpp
live555: remove dead fallback for speex
[vlc] / modules / access / live555.cpp
index b14898cbfd18209f30620fe58db905c9a148bd6e..d49fc6d3f2126b96236ce350f4664554967aa28e 100644 (file)
@@ -976,11 +976,6 @@ static int SessionsSetup( demux_t *p_demux )
                 else if( !strcmp( sub->codecName(), "SPEEX" ) )
                 {
                     tk->fmt.i_codec = VLC_FOURCC( 's', 'p', 'x', 'r' );
-                    if ( tk->fmt.audio.i_rate == 0 )
-                    {
-                        msg_Warn( p_demux,"Using 8kHz as default sample rate." );
-                        tk->fmt.audio.i_rate = 8000;
-                    }
                 }
                 else if( !strcmp( sub->codecName(), "VORBIS" ) )
                 {
@@ -996,6 +991,10 @@ static int SessionsSetup( demux_t *p_demux )
                     else
                         msg_Warn( p_demux,"Missing or unsupported vorbis header." );
                 }
+                else if( !strcmp( sub->codecName(), "OPUS" ) )
+                {
+                    tk->fmt.i_codec = VLC_CODEC_OPUS;
+                }
             }
             else if( !strcmp( sub->mediumName(), "video" ) )
             {
@@ -1292,7 +1291,7 @@ static int Demux( demux_t *p_demux )
         {
             bool b;
             es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
-            if( !b && tk->b_selected )
+            if( !b && tk->b_selected && p_sys->rtsp )
             {
                 tk->b_selected = false;
                 p_sys->rtsp->sendTeardownCommand( *tk->sub, NULL );