]> git.sesse.net Git - vlc/commitdiff
Add missing p_vout->pf_end in vmem.c and snapshot.c
authorSam Hocevar <sam@zoy.org>
Fri, 21 Mar 2008 21:17:57 +0000 (21:17 +0000)
committerSam Hocevar <sam@zoy.org>
Fri, 21 Mar 2008 21:25:49 +0000 (21:25 +0000)
The p_vout->pf_end method is mandatory for video output modules. It is
called from so many places in libvlc that it would be too tedious to
make it optional. I'm therefore adding empty methods to modules instead.

modules/video_output/snapshot.c
modules/video_output/vmem.c

index a087268760f66bdc048decf06ae2b65ad4f33e7b..c13a4ef928dd84e102237b65fa2dfe57fa9ea12f 100644 (file)
@@ -55,6 +55,7 @@ static int  Create    ( vlc_object_t * );
 static void Destroy   ( vlc_object_t * );
 
 static int  Init      ( vout_thread_t * );
+static void End       ( vout_thread_t * );
 static void Display   ( vout_thread_t *, picture_t * );
 
 /*****************************************************************************
@@ -123,7 +124,7 @@ static int Create( vlc_object_t *p_this )
     var_Create( p_vout, "snapshot-list-pointer", VLC_VAR_ADDRESS );
 
     p_vout->pf_init = Init;
-    p_vout->pf_end = NULL;
+    p_vout->pf_end = End;
     p_vout->pf_manage = NULL;
     p_vout->pf_render = NULL;
     p_vout->pf_display = Display;
@@ -317,6 +318,14 @@ static int Init( vout_thread_t *p_vout )
     return VLC_SUCCESS;
 }
 
+/*****************************************************************************
+ * End: terminate video thread output method
+ *****************************************************************************/
+static void End( vout_thread_t *p_vout )
+{
+    (void)p_vout;
+}
+
 /*****************************************************************************
  * Destroy: destroy video thread
  *****************************************************************************
index 80eb9cc352217c0a920fe7d0d81fce37754bc4d1..407c84246a65400574b931f2382d2ecf74865866 100644 (file)
@@ -39,6 +39,7 @@ static int  Create    ( vlc_object_t * );
 static void Destroy   ( vlc_object_t * );
 
 static int  Init          ( vout_thread_t * );
+static void End           ( vout_thread_t * );
 static int  LockPicture   ( vout_thread_t *, picture_t * );
 static int  UnlockPicture ( vout_thread_t *, picture_t * );
 
@@ -115,7 +116,7 @@ static int Create( vlc_object_t *p_this )
         return VLC_ENOMEM;
 
     p_vout->pf_init = Init;
-    p_vout->pf_end = NULL;
+    p_vout->pf_end = End;
     p_vout->pf_manage = NULL;
     p_vout->pf_render = NULL;
     p_vout->pf_display = NULL;
@@ -249,6 +250,14 @@ static int Init( vout_thread_t *p_vout )
     return VLC_SUCCESS;
 }
 
+/*****************************************************************************
+ * End: terminate video thread output method
+ *****************************************************************************/
+static void End( vout_thread_t *p_vout )
+{
+    (void)p_vout;
+}
+
 /*****************************************************************************
  * Destroy: destroy video thread
  *****************************************************************************