Skip to content

Commit

Permalink
Remove system_End() except on Windows, simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Denis-Courmont committed Sep 6, 2012
1 parent 6884e6d commit 6b51f70
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
12 changes: 3 additions & 9 deletions src/libvlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{
msg_Err( p_libvlc, "D-Bus problem" );
free( psz_mrl );
system_End( );
exit( 1 );
}

Expand All @@ -368,7 +367,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{
dbus_message_unref( p_dbus_msg );
free( psz_mrl );
system_End( );
exit( 1 );
}
free( psz_mrl );
Expand All @@ -377,7 +375,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
DBUS_TYPE_OBJECT_PATH, &psz_after_track ) )
{
dbus_message_unref( p_dbus_msg );
system_End( );
exit( 1 );
}

Expand All @@ -389,7 +386,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
DBUS_TYPE_BOOLEAN, &b_play ) )
{
dbus_message_unref( p_dbus_msg );
system_End( );
exit( 1 );
}

Expand All @@ -399,15 +395,13 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{
msg_Err( p_libvlc, "D-Bus problem" );
dbus_message_unref( p_dbus_msg );
system_End( );
exit( 1 );
}

if ( NULL == p_dbus_pending )
{
msg_Err( p_libvlc, "D-Bus problem" );
dbus_message_unref( p_dbus_msg );
system_End( );
exit( 1 );
}
dbus_connection_flush( p_conn );
Expand All @@ -418,7 +412,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
} /* processes all command line MRLs */

/* bye bye */
system_End( );
exit( 0 );
}
}
Expand Down Expand Up @@ -715,6 +708,9 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
module_EndBank (true);

vlc_DeinitActions( p_libvlc, priv->actions );
#ifdef WIN32
system_End( );
#endif
}

/**
Expand All @@ -728,8 +724,6 @@ void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
{
libvlc_priv_t *priv = libvlc_priv( p_libvlc );

system_End( );

/* Destroy mutexes */
vlc_ExitDestroy( &priv->exit );
vlc_mutex_destroy( &priv->ml_lock );
Expand Down
5 changes: 3 additions & 2 deletions src/libvlc.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ size_t vlc_towc (const char *str, uint32_t *restrict pwc);
*/
void system_Init ( void );
void system_Configure ( libvlc_int_t *, int, const char *const [] );
void system_End ( void );

#ifdef WIN32
void system_End(void);
#endif
void vlc_CPU_init(void);
void vlc_CPU_dump(vlc_object_t *);

Expand Down
4 changes: 0 additions & 4 deletions src/os2/specific.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,3 @@ void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_
}
}
}

void system_End( void )
{
}
8 changes: 0 additions & 8 deletions src/posix/darwin_specific.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,3 @@ void system_Configure( libvlc_int_t *p_this,
(void)i_argc;
(void)ppsz_argv;
}

/*****************************************************************************
* system_End: free the program path.
*****************************************************************************/
void system_End( void )
{
}

4 changes: 0 additions & 4 deletions src/posix/specific.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,3 @@ void system_Configure (libvlc_int_t *libvlc,
{
(void)libvlc; (void)argc; (void)argv;
}

void system_End (void)
{
}

0 comments on commit 6b51f70

Please sign in to comment.