X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fstream_output%2Fstream_output.c;h=d200fc0e95efef118c3919f52450b326c48db9ca;hb=6ee1e193fd896ab9a4729fde14f009d9ce629815;hp=dc586418eabd50b02bcce1b795d3a6ee47c67811;hpb=d7bc817f72e44cacf0fc9468c7988ee1f4b565a7;p=vlc diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c index dc586418ea..d200fc0e95 100644 --- a/src/stream_output/stream_output.c +++ b/src/stream_output/stream_output.c @@ -73,45 +73,6 @@ static void mrl_Clean( mrl_t *p_mrl ); sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest ) { sout_instance_t *p_sout; - vlc_value_t keep; - - if( var_Get( p_parent, "sout-keep", &keep ) >= 0 && keep.b_bool ) - { - /* Remove the sout from the playlist garbage collector */ - playlist_t *p_playlist = pl_Yield( p_parent ); - - vlc_mutex_lock( &p_playlist->gc_lock ); - p_sout = vlc_object_find( p_playlist, VLC_OBJECT_SOUT, FIND_CHILD ); - if( p_sout && p_sout->p_parent != (vlc_object_t *)p_playlist ) - { - vlc_object_release( p_sout ); - p_sout = NULL; - } - if( p_sout ) - vlc_object_detach( p_sout ); /* Remove it from the GC */ - vlc_mutex_unlock( &p_playlist->gc_lock ); - - pl_Release( p_parent ); - - /* */ - - if( p_sout ) - { - if( !strcmp( p_sout->psz_sout, psz_dest ) ) - { - msg_Dbg( p_parent, "sout keep: reusing sout" ); - msg_Dbg( p_parent, "sout keep: you probably want to use " - "gather stream_out" ); - vlc_object_attach( p_sout, p_parent ); - vlc_object_release( p_sout ); - return p_sout; - } - - msg_Dbg( p_parent, "sout keep: destroying unusable sout" ); - vlc_object_release( p_sout ); - sout_DeleteInstance( p_sout ); - } - } /* *** Allocate descriptor *** */ p_sout = vlc_object_create( p_parent, VLC_OBJECT_SOUT ); @@ -164,9 +125,6 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest ) *****************************************************************************/ void sout_DeleteInstance( sout_instance_t * p_sout ) { - /* Unlink object */ - vlc_object_detach( p_sout ); - /* remove the stream out chain */ sout_StreamDelete( p_sout->p_stream ); @@ -374,11 +332,11 @@ int sout_AccessOutWrite( sout_access_out_t *p_access, block_t *p_buffer ) if( p_input ) { stats_UpdateInteger( p_input, p_input->p->counters.p_sout_sent_packets, - 30, NULL ); + 30, NULL ); stats_UpdateInteger( p_input, p_input->p->counters.p_sout_sent_bytes, p_access->i_sent_bytes, &i_total ); stats_UpdateFloat( p_input, p_input->p->counters.p_sout_send_bitrate, - (float)i_total, NULL ); + (float)i_total, NULL ); p_access->i_sent_bytes = 0; vlc_object_release( p_input ); }