Commit d8b4a5b6 authored by Rafaël Carré's avatar Rafaël Carré

fix #1421

parent 389c19e1
...@@ -125,9 +125,7 @@ int Demux( demux_t *p_demux ) ...@@ -125,9 +125,7 @@ int Demux( demux_t *p_demux )
{ {
input_item_t *p_new_input = p_demux->p_sys->pp_tracklist[i]; input_item_t *p_new_input = p_demux->p_sys->pp_tracklist[i];
if( p_new_input ) if( p_new_input )
{
input_ItemAddSubItem( p_current_input, p_new_input, VLC_FALSE ); input_ItemAddSubItem( p_current_input, p_new_input, VLC_FALSE );
}
vlc_gc_decref( p_new_input ); vlc_gc_decref( p_new_input );
} }
...@@ -490,13 +488,9 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE ...@@ -490,13 +488,9 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
if( !strcmp( psz_name, psz_element ) ) if( !strcmp( psz_name, psz_element ) )
{ {
FREE_ATT(); FREE_ATT();
if( p_demux->p_sys->i_identifier < if( p_demux->p_sys->i_identifier == -1 ||
p_demux->p_sys->i_identifier ==
p_demux->p_sys->i_tracklist_entries ) p_demux->p_sys->i_tracklist_entries )
{
p_demux->p_sys->pp_tracklist[
p_demux->p_sys->i_identifier ] = p_new_input;
}
else
{ {
if( p_demux->p_sys->i_identifier > if( p_demux->p_sys->i_identifier >
p_demux->p_sys->i_tracklist_entries ) p_demux->p_sys->i_tracklist_entries )
...@@ -508,6 +502,13 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE ...@@ -508,6 +502,13 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
p_demux->p_sys->i_tracklist_entries, p_demux->p_sys->i_tracklist_entries,
p_demux->p_sys->i_tracklist_entries, p_demux->p_sys->i_tracklist_entries,
p_new_input ); p_new_input );
p_demux->p_sys->i_identifier = -1;
}
else
{
msg_Err( p_demux, "Invalid identifier %d", p_demux->p_sys->i_identifier );
p_demux->p_sys->i_identifier = -1;
return VLC_FALSE;
} }
return VLC_TRUE; return VLC_TRUE;
} }
...@@ -578,7 +579,8 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE ...@@ -578,7 +579,8 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
return VLC_FALSE; return VLC_FALSE;
} }
} }
else if( !strcmp( p_handler->name, "identifier" ) ) else if( !strcmp( p_handler->name, "identifier" ) &&
*psz_value >= '0' && *psz_value <= '9' )
{ {
p_demux->p_sys->i_identifier = atoi( psz_value ); p_demux->p_sys->i_identifier = atoi( psz_value );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment