return s;
}
+
void stream_CommonDelete( stream_t *s )
{
if( s->p_text )
strcpy( psz_dup, psz_url );
input_SplitMRL( &psz_access, &psz_demux, &psz_path, psz_dup );
+ /* Get a weak link to the parent input */
+ /* FIXME: This should probably be removed in favor of a NULL input. */
+ input_thread_t *p_input = (input_thread_t *)vlc_object_find( p_parent, VLC_OBJECT_INPUT, FIND_PARENT );
+
/* Now try a real access */
- p_access = access_New( p_parent, psz_access, psz_demux, psz_path );
+ p_access = access_New( p_parent, p_input, psz_access, psz_demux, psz_path );
+
+ if(p_input)
+ vlc_object_release((vlc_object_t*)p_input);
if( p_access == NULL )
{
if( !s )
return NULL;
+ s->p_input = p_access->p_input;
s->psz_path = strdup( p_access->psz_path );
s->p_sys = p_sys = malloc( sizeof( *p_sys ) );
if( !s->psz_path || !s->p_sys )
if( !psz_name )
break;
- access_t *p_tmp = access_New( p_access,
+ access_t *p_tmp = access_New( p_access, p_access->p_input,
p_access->psz_access, "", psz_name );
if( !p_tmp )
continue;
}
/* FIXME that's UGLY */
- input_thread_t *p_input;
- p_input = (input_thread_t *)vlc_object_find( s, VLC_OBJECT_INPUT, FIND_PARENT );
+ input_thread_t *p_input = s->p_input;
if( p_input != NULL)
{
var_Create( p_input, "subsdec-encoding", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
msg_Dbg( s, "opening input `%s'", psz_name );
- p_list_access = access_New( s, p_access->psz_access, "", psz_name );
+ p_list_access = access_New( s, s->p_input, p_access->psz_access, "", psz_name );
if( !p_list_access ) return 0;
msg_Dbg( s, "opening input `%s'", psz_name );
- p_list_access = access_New( s, p_access->psz_access, "", psz_name );
+ p_list_access = access_New( s, s->p_input, p_access->psz_access, "", psz_name );
if( !p_list_access ) return 0;
if( i != p_sys->i_list_index && i != 0 )
{
p_list_access =
- access_New( s, p_access->psz_access, "", psz_name );
+ access_New( s, s->p_input, p_access->psz_access, "", psz_name );
}
else if( i != p_sys->i_list_index )
{