#include "modules/modules.h"
#include "config/configuration.h"
+#include "interface/interface.h"
#include <errno.h> /* ENOMEM */
#include <stdio.h> /* sprintf() */
return NULL;
}
p_libvlc->p_playlist = NULL;
+ p_libvlc->p_interaction = NULL;
p_libvlc->psz_object_name = "libvlc";
/* Initialize message queue */
config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE );
libvlc_global.p_module_bank->b_cache_delete = b_cache_delete;
}
- if( psz_language ) free( psz_language );
+ free( psz_language );
# endif
#endif
/* Do a copy (we don't need to modify the strings) */
memcpy( p_libvlc->p_hotkeys, libvlc_hotkeys, libvlc_hotkeys_size );
+ /* Initialize interaction */
+ p_libvlc->p_interaction = interaction_Init( p_libvlc );
+
/* Initialize playlist and get commandline files */
playlist_ThreadCreate( p_libvlc );
if( !p_libvlc->p_playlist )
/* Add service discovery modules */
playlist_ServicesDiscoveryAdd( p_playlist, psz_modules );
}
- if( psz_modules ) free( psz_modules );
+ free( psz_modules );
/*
* Load background interfaces
if( psz_morecodecs )
{
config_PutPsz( p_libvlc, "codec", psz_morecodecs);
- free(psz_morecodecs);
+ free( psz_morecodecs );
}
}
else
config_PutPsz( p_libvlc, "codec", "dmo,quicktime");
- free(psz_codecs);
+ free( psz_codecs );
}
#endif
VLC_AddTarget( p_libvlc->i_object_id, val.psz_string, NULL, 0,
PLAYLIST_INSERT, 0 );
}
- if ( val.psz_string != NULL ) free( val.psz_string );
+ free( val.psz_string );
return VLC_SUCCESS;
}
aout_Delete( p_aout );
}
+ /* Free interaction */
+ msg_Dbg( p_libvlc, "removing interaction" );
+ vlc_object_release( p_libvlc->p_interaction );
+
stats_TimersDumpAll( p_libvlc );
stats_TimersClean( p_libvlc );
psz_pidfile );
}
}
- free ( psz_pidfile );
+ free( psz_pidfile );
}
#endif
* We prefer the dummy interface if none is specified. */
char *psz_interface = config_GetPsz( p_libvlc, "intf" );
if( !psz_interface || !*psz_interface ) psz_module = "dummy";
- if( psz_interface ) free( psz_interface );
+ free( psz_interface );
}
#endif