unsigned int i_buffer = 0;
unsigned const thresh = 200000; /* RTP reorder threshold .2 second (default .1) */
- b_rtsp_tcp = var_InheritBool( p_demux, "rtsp-tcp" ) ||
+ b_rtsp_tcp = var_CreateGetBool( p_demux, "rtsp-tcp" ) ||
var_InheritBool( p_demux, "rtsp-http" );
i_client_port = var_InheritInteger( p_demux, "rtp-client-port" );
* use and try again */
if( p_sys->i_live555_ret == 461 )
p_sys->rtsp->sendSetupCommand( *sub, default_live555_callback, False,
- toBool( b_rtsp_tcp ), False );
+ !toBool( b_rtsp_tcp ), False );
if( p_sys->i_live555_ret != 461 || !wait_Live555_response( p_demux ) )
{
msg_Err( p_demux, "SETUP of'%s/%s' failed %s",
sub->rtcpInstance()->setByeHandler( StreamClose, tk );
}
- if( tk->p_es || tk->b_quicktime || tk->b_muxed || tk->b_asf )
+ if( tk->p_es || tk->b_quicktime || ( tk->b_muxed && tk->p_out_muxed ) ||
+ ( tk->b_asf && p_sys->p_out_asf ) )
{
/* Append */
p_sys->track = (live_track_t**)xrealloc( p_sys->track,
var_SetBool( p_demux, "rtsp-tcp", true );
/* We close the old RTSP session */
+ p_sys->rtsp->sendTeardownCommand( *p_sys->ms, NULL );
+ Medium::close( p_sys->ms );
+ RTSPClient::close( p_sys->rtsp );
+
for( i = 0; i < p_sys->i_track; i++ )
{
live_track_t *tk = p_sys->track[i];
if( p_sys->i_track ) free( p_sys->track );
if( p_sys->p_out_asf ) stream_Delete( p_sys->p_out_asf );
- p_sys->rtsp->sendTeardownCommand( *p_sys->ms, NULL );
- Medium::close( p_sys->ms );
- RTSPClient::close( p_sys->rtsp );
-
p_sys->ms = NULL;
p_sys->rtsp = NULL;
p_sys->track = NULL;