[vlc-devel] commit: media_player: cosmetics (Jean-Paul Saman )

git version control git at videolan.org
Tue May 12 14:26:51 CEST 2009


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Sat May  9 21:57:51 2009 +0200| [3fa0d24d137ca36598d83cb77175fdf351bd8784] | committer: Jean-Paul Saman 

media_player: cosmetics

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fa0d24d137ca36598d83cb77175fdf351bd8784
---

 src/control/media_player.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/control/media_player.c b/src/control/media_player.c
index b219cbc..a65b133 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -326,6 +326,7 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
     /* Snapshot initialization */
     libvlc_event_manager_register_event_type( p_mi->p_event_manager,
            libvlc_MediaPlayerSnapshotTaken, p_e );
+
     /* Attach a var callback to the global object to provide the glue between
         vout_thread that generates the event and media_player that re-emits it
         with its own event manager
@@ -347,8 +348,8 @@ libvlc_media_player_new_from_media(
                                     libvlc_exception_t *p_e )
 {
     libvlc_media_player_t * p_mi;
-    p_mi = libvlc_media_player_new( p_md->p_libvlc_instance, p_e );
 
+    p_mi = libvlc_media_player_new( p_md->p_libvlc_instance, p_e );
     if( !p_mi )
         return NULL;
 
@@ -375,14 +376,12 @@ libvlc_media_player_t * libvlc_media_player_new_from_input_thread(
     }
 
     p_mi = libvlc_media_player_new( p_libvlc_instance, p_e );
-
     if( !p_mi )
         return NULL;
 
     p_mi->p_md = libvlc_media_new_from_input_item(
                     p_libvlc_instance,
                     input_GetItem( p_input ), p_e );
-
     if( !p_mi->p_md )
     {
         libvlc_media_player_destroy( p_mi );
@@ -408,11 +407,11 @@ void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
     input_thread_t *p_input_thread;
     libvlc_exception_t p_e;
 
-    libvlc_exception_init( &p_e );
-
     if( !p_mi )
         return;
 
+    libvlc_exception_init( &p_e );
+
 	/* Detach Callback from the main libvlc object */
     var_DelCallback( p_mi->p_libvlc_instance->p_libvlc_int,
                      "vout-snapshottaken", SnapshotTakenCallback, p_mi );




More information about the vlc-devel mailing list