int i;
/* Set die for input */
- p_input->b_die = VLC_TRUE;
+ vlc_object_kill( p_input );
+ /* FIXME: seems to be duplicated in ControlPush(INPUT_CONTROL_SET_DIE) */
/* We cannot touch p_input fields directly (we come from another thread),
* so use the vlc_object_find way, it's perfectly safe */
p_list = vlc_list_find( p_input, VLC_OBJECT_ACCESS, FIND_CHILD );
for( i = 0; i < p_list->i_count; i++ )
{
- p_list->p_values[i].p_object->b_die = VLC_TRUE;
+ vlc_object_kill( p_list->p_values[i].p_object );
}
vlc_list_release( p_list );
p_list = vlc_list_find( p_input, VLC_OBJECT_STREAM, FIND_CHILD );
for( i = 0; i < p_list->i_count; i++ )
{
- p_list->p_values[i].p_object->b_die = VLC_TRUE;
+ vlc_object_kill( p_list->p_values[i].p_object );
}
vlc_list_release( p_list );
p_list = vlc_list_find( p_input, VLC_OBJECT_DEMUX, FIND_CHILD );
for( i = 0; i < p_list->i_count; i++ )
{
- p_list->p_values[i].p_object->b_die = VLC_TRUE;
+ vlc_object_kill( p_list->p_values[i].p_object );
}
vlc_list_release( p_list );
msg_Dbg( p_input, "control: stopping input" );
/* Mark all submodules to die */
if( p_input->p->input.p_access )
- p_input->p->input.p_access->b_die = VLC_TRUE;
+ vlc_object_kill( p_input->p->input.p_access );
if( p_input->p->input.p_stream )
- p_input->p->input.p_stream->b_die = VLC_TRUE;
- p_input->p->input.p_demux->b_die = VLC_TRUE;
+ vlc_object_kill( p_input->p->input.p_stream );
+ vlc_object_kill( p_input->p->input.p_demux );
- p_input->b_die = VLC_TRUE;
+ vlc_object_kill( p_input );
break;
case INPUT_CONTROL_SET_POSITION:
char *psz;
vlc_value_t val;
- strcpy (psz_dup, psz_mrl);
+ strcpy( psz_dup, psz_mrl );
if( !in ) return VLC_EGENERIC;
if( !p_input ) return VLC_EGENERIC;
{
psz_demux = in->p_access->psz_demux;
}
- in->p_demux = demux2_New( p_input, psz_access, psz_demux,
- in->p_access->psz_path
- ? in->p_access->psz_path
- : psz_path,
- in->p_stream, p_input->p->p_es_out,
- p_input->b_preparsing );
+
+ {
+ /* Take access redirections into account */
+ char *psz_real_path;
+ char *psz_buf = NULL;
+ if( in->p_access->psz_path )
+ {
+ psz_buf = strdup( in->p_access->psz_path );
+ char *psz_a, *psz_d;
+ MRLSplit( p_input, psz_buf, &psz_a, &psz_d, &psz_real_path );
+ }
+ else
+ {
+ psz_real_path = psz_path;
+ }
+ in->p_demux = demux2_New( p_input, psz_access, psz_demux,
+ psz_real_path,
+ in->p_stream, p_input->p->p_es_out,
+ p_input->b_preparsing );
+ free( psz_buf );
+ }
+
if( in->p_demux == NULL )
{
msg_Err( p_input, "no suitable demux module for `%s/%s://%s'",