* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
- * Olivier Teulière <ipkiss@via.ecp.fr>
+ * Olivier Teulière <ipkiss@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <stdlib.h>
p_intf->pf_run = Run;
// Suscribe to messages bank
- p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
+ p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
p_intf->p_sys->p_input = NULL;
p_intf->p_sys->p_playlist = (playlist_t *)vlc_object_find( p_intf,
if( p_intf->p_sys->p_playlist == NULL )
{
msg_Err( p_intf, "No playlist object found" );
+ msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
return VLC_EGENERIC;
}
if( OSFactory::instance( p_intf ) == NULL )
{
msg_Err( p_intf, "Cannot initialize OSFactory" );
- vlc_object_release( p_intf->p_sys->p_playlist );
+ vlc_object_release( p_intf->p_sys->p_playlist );
+ msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
return VLC_EGENERIC;
}
if( AsyncQueue::instance( p_intf ) == NULL )
{
msg_Err( p_intf, "Cannot initialize AsyncQueue" );
- vlc_object_release( p_intf->p_sys->p_playlist );
+ vlc_object_release( p_intf->p_sys->p_playlist );
+ msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
return VLC_EGENERIC;
}
if( Interpreter::instance( p_intf ) == NULL )
{
msg_Err( p_intf, "Cannot instanciate Interpreter" );
- vlc_object_release( p_intf->p_sys->p_playlist );
+ vlc_object_release( p_intf->p_sys->p_playlist );
+ msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
return VLC_EGENERIC;
}
if( VarManager::instance( p_intf ) == NULL )
{
msg_Err( p_intf, "Cannot instanciate VarManager" );
- vlc_object_release( p_intf->p_sys->p_playlist );
+ vlc_object_release( p_intf->p_sys->p_playlist );
+ msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
return VLC_EGENERIC;
}
if( VlcProc::instance( p_intf ) == NULL )
{
msg_Err( p_intf, "Cannot initialize VLCProc" );
- vlc_object_release( p_intf->p_sys->p_playlist );
+ vlc_object_release( p_intf->p_sys->p_playlist );
+ msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
return VLC_EGENERIC;
}
Dialogs::instance( p_intf );
vlc_object_release( p_intf->p_sys->p_playlist );
}
- // Unsubscribe from messages bank
+ // Unsubscribe from messages bank
msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
// Destroy structure
FIND_ANYWHERE );
if( p_playlist )
{
- p_playlist->status.i_view = -1;
- playlist_Control( p_playlist, PLAYLIST_AUTOPLAY );
+ playlist_LockControl( p_playlist, PLAYLIST_AUTOPLAY );
vlc_object_release( p_playlist );
}
}
p_demux->pf_demux = Demux;
p_demux->pf_control = DemuxControl;
- // Test that we have a valid .vlt file, based on the extension
+ // Test that we have a valid .vlt or .wsz file, based on the extension
// TODO: an actual check of the contents would be better...
if( ( ext = strchr( p_demux->psz_path, '.' ) ) == NULL ||
- strcasecmp( ext, ".vlt" ) )
+ ( strcasecmp( ext, ".vlt" ) && strcasecmp( ext, ".wsz" ) ) )
{
return VLC_EGENERIC;
}