Commit e85e3538 authored by Olivier Aubert's avatar Olivier Aubert

mediacontrol_core.c: remove handling of the start position for...

mediacontrol_core.c: remove handling of the start position for mediacontrol_start, it crashes the application
parent 9ccd09bb
......@@ -188,40 +188,7 @@ mediacontrol_start( mediacontrol_Instance *self,
RAISE( mediacontrol_PlaylistException, "No available playlist" );
return;
}
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->i_size )
{
int i_index;
int i_from;
char *psz_from = NULL;
psz_from = ( char * )malloc( 20 * sizeof( char ) );
if( psz_from )
{
i_from = mediacontrol_position2microsecond( p_playlist->p_input, a_position ) / 1000000;
i_index = p_playlist->i_index;
if( i_index < 0 )
{
/* We know that there is at least 1 element, since i_size != 0 */
i_index = 0;
}
/* Set start time */
snprintf( psz_from, 20, "start-time=%i", i_from );
playlist_ItemAddOption( p_playlist->pp_items[i_index], psz_from );
free( psz_from );
}
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Play( p_playlist );
}
else
{
RAISE( mediacontrol_PlaylistException, "Empty playlist." );
vlc_mutex_unlock( &p_playlist->object_lock );
}
playlist_Play( p_playlist );
}
void
......
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