Commit 1c672e57 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

VLC: make sure the playlist exists before starting any interface

This avoids creating the playlist from the UI mainloop, which is not
typically a good idea.
parent 6f23d187
......@@ -111,24 +111,6 @@ void libvlc_release( libvlc_instance_t *p_instance )
}
}
int libvlc_add_intf( libvlc_instance_t *p_i, const char *name )
{
if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name ))
{
if( name )
{
libvlc_printerr("interface \"%s\" initialization failed",
name );
}
else
{
libvlc_printerr("default interface initialization failed");
}
return -1;
}
return 0;
}
void libvlc_set_exit_handler( libvlc_instance_t *p_i, void (*cb) (void *),
void *data )
{
......
......@@ -50,3 +50,18 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id,
return;
playlist_Control( pl, PLAYLIST_PLAY, false );
}
int libvlc_add_intf( libvlc_instance_t *p_instance, const char *name )
{
pl_Get (p_instance->p_libvlc_int);
if( libvlc_InternalAddIntf( p_instance->p_libvlc_int, name ))
{
if( name != NULL )
libvlc_printerr("interface \"%s\" initialization failed", name );
else
libvlc_printerr("default interface initialization failed");
return -1;
}
return 0;
}
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