]> git.sesse.net Git - vlc/blobdiff - modules/demux/live555.cpp
i18n fix
[vlc] / modules / demux / live555.cpp
index 28e03e01cea466efe79ad5e3c153198008f05ca7..2f0f4e23c30f483a358dcf59fb69540e3d792b0e 100644 (file)
@@ -107,6 +107,7 @@ vlc_module_begin ()
     add_submodule ()
         set_description( N_("RTSP/RTP access and demux") )
         add_shortcut( "rtsp" )
+        add_shortcut( "pnm" )
         add_shortcut( "sdp" )
         add_shortcut( "live" )
         add_shortcut( "livedotcom" )
@@ -224,6 +225,7 @@ struct demux_sys_t
 
     bool             b_get_param;   /* Does the server support GET_PARAMETER */
     bool             b_paused;      /* Are we paused? */
+    bool             b_error;
 
     float            f_seek_request;/* In case we receive a seek request while paused*/
 };
@@ -272,10 +274,7 @@ static int  Open ( vlc_object_t *p_this )
             return VLC_EGENERIC;
         }
     }
-    else
-    {
-        var_Create( p_demux, "rtsp-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
-    }
+    var_Create( p_demux, "rtsp-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
 
     p_demux->pf_demux  = Demux;
     p_demux->pf_control= Control;
@@ -306,6 +305,7 @@ static int  Open ( vlc_object_t *p_this )
     p_sys->b_get_param = false;
     p_sys->b_paused = false;
     p_sys->f_seek_request = -1;
+    p_sys->b_error = false;
 
     /* parse URL for rtsp://[user:[passwd]@]serverip:port/options */
     vlc_UrlParse( &p_sys->url, p_sys->psz_path, 0 );
@@ -345,7 +345,7 @@ static int  Open ( vlc_object_t *p_this )
             int i_read = stream_Read( p_demux->s, &p_sdp[i_sdp],
                                       i_sdp_max - i_sdp - 1 );
 
-            if( !vlc_object_alive (p_demux) || p_demux->b_error )
+            if( !vlc_object_alive (p_demux) )
             {
                 free( p_sdp );
                 goto error;
@@ -503,7 +503,7 @@ static int Connect( demux_t *p_demux )
     }
 
 createnew:
-    if( !vlc_object_alive (p_demux) || p_demux->b_error )
+    if( !vlc_object_alive (p_demux) )
     {
         i_ret = VLC_EGENERIC;
         goto bailout;
@@ -674,7 +674,7 @@ static int SessionsSetup( demux_t *p_demux )
         Boolean bInit;
         live_track_t *tk;
 
-        if( !vlc_object_alive (p_demux) || p_demux->b_error )
+        if( !vlc_object_alive (p_demux) )
         {
             delete iter;
             return VLC_EGENERIC;
@@ -1227,7 +1227,7 @@ static int Demux( demux_t *p_demux )
         msg_Warn( p_demux, "no data received in 10s, eof ?" );
         return 0;
     }
-    return p_demux->b_error ? 0 : 1;
+    return p_sys->b_error ? 0 : 1;
 }
 
 /*****************************************************************************
@@ -1426,7 +1426,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 return VLC_SUCCESS;
             if( ( b_pause && !p_sys->rtsp->pauseMediaSession( *p_sys->ms ) ) ||
                     ( !b_pause && !p_sys->rtsp->playMediaSession( *p_sys->ms,
-                       p_sys->f_seek_request ) ) )
+                       p_sys->f_seek_request, -1.0f, p_sys->ms->scale() ) ) )
             {
                     msg_Err( p_demux, "PLAY or PAUSE failed %s", p_sys->env->getResultMsg() );
                     return VLC_EGENERIC;
@@ -1523,6 +1523,7 @@ static int RollOverTcp( demux_t *p_demux )
     p_sys->i_track = 0;
     p_sys->b_no_data = true;
     p_sys->i_no_data_ti = 0;
+    p_sys->p_out_asf = NULL;
 
     /* Reopen rtsp client */
     if( ( i_return = Connect( p_demux ) ) != VLC_SUCCESS )
@@ -1778,7 +1779,7 @@ static void StreamClose( void *p_private )
     msg_Dbg( p_demux, "StreamClose" );
 
     p_sys->event = 0xff;
-    p_demux->b_error = true;
+    p_sys->b_error = true;
 }