#include <vlc_meta.h>
#include <vlc_block.h>
#include <vlc_codec.h>
+#include <vlc_modules.h>
#include "input/input_interface.h"
else
{
psz_chain = sout_stream_url_to_chain(
- config_GetInt(p_parent, "sout-display") > 0, psz_dest );
+ var_InheritBool(p_parent, "sout-display"), psz_dest );
}
if(!psz_chain)
return NULL;
FREENULL( p_sout->psz_sout );
- vlc_object_detach( p_sout );
vlc_object_release( p_sout );
return NULL;
}
{
free( p_access->psz_access );
free( p_access->psz_path );
- vlc_object_detach( p_access );
vlc_object_release( p_access );
return( NULL );
}
*****************************************************************************/
void sout_AccessOutDelete( sout_access_out_t *p_access )
{
- vlc_object_detach( p_access );
if( p_access->p_module )
{
module_unneed( p_access, p_access->p_module );
{
FREENULL( p_mux->psz_mux );
- vlc_object_detach( p_mux );
vlc_object_release( p_mux );
return NULL;
}
*****************************************************************************/
void sout_MuxDelete( sout_mux_t *p_mux )
{
- vlc_object_detach( p_mux );
if( p_mux->p_module )
{
module_unneed( p_mux, p_mux->p_module );
{
msg_Dbg( p_stream, "destroying chain... (name=%s)", p_stream->psz_name );
- vlc_object_detach( p_stream );
if( p_stream->p_module ) module_unneed( p_stream, p_stream->p_module );
FREENULL( p_stream->psz_name );
*/
void sout_StreamChainDelete(sout_stream_t *p_first, sout_stream_t *p_last)
{
- if(!p_first)
- return;
-
- if(p_first != p_last)
- sout_StreamChainDelete(p_first->p_next, p_last);
+ while(p_first != NULL)
+ {
+ sout_stream_t *p_next = p_first->p_next;
- sout_StreamDelete(p_first);
+ sout_StreamDelete(p_first);
+ if(p_first == p_last)
+ break;
+ p_first = p_next;
+ }
}
/* Create a "stream_out" module, which may forward its ES to p_next module */
if (psz_chain && b_sout_display)
{
char *tmp;
- if (asprintf (&tmp, "duplicate{dst=display,dst=%s}", tmp) == -1)
+ if (asprintf (&tmp, "duplicate{dst=display,dst=%s}", psz_chain) == -1)
tmp = NULL;
free (psz_chain);
psz_chain = tmp;