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

git version control git at videolan.org
Mon May 25 00:36:28 CEST 2009


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

media_player: cosmetics
(cherry picked from commit 3fa0d24d137ca36598d83cb77175fdf351bd8784)

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

 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 3ac2867..f358ad4 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -327,6 +327,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
@@ -348,8 +349,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;
 
@@ -376,14 +377,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 );
@@ -409,11 +408,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