[vlc-devel] commit: Add missing p_vout->pf_end in vmem.c and snapshot.c (Sam Hocevar )

git version control git at videolan.org
Fri Mar 21 22:31:29 CET 2008


vlc | branch: master | Sam Hocevar <sam at zoy.org> | Fri Mar 21 21:17:57 2008 +0000| [fe22119f649296e0cdf03051c41fb749bc14cc40]

Add missing p_vout->pf_end in vmem.c and snapshot.c

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.

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

 modules/video_output/snapshot.c |   11 ++++++++++-
 modules/video_output/vmem.c     |   11 ++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/snapshot.c b/modules/video_output/snapshot.c
index a087268..c13a4ef 100644
--- a/modules/video_output/snapshot.c
+++ b/modules/video_output/snapshot.c
@@ -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;
@@ -318,6 +319,14 @@ static int Init( vout_thread_t *p_vout )
 }
 
 /*****************************************************************************
+ * End: terminate video thread output method
+ *****************************************************************************/
+static void End( vout_thread_t *p_vout )
+{
+    (void)p_vout;
+}
+
+/*****************************************************************************
  * Destroy: destroy video thread
  *****************************************************************************
  * Terminate an output method created by Create
diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 80eb9cc..407c842 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -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;
@@ -250,6 +251,14 @@ static int Init( vout_thread_t *p_vout )
 }
 
 /*****************************************************************************
+ * End: terminate video thread output method
+ *****************************************************************************/
+static void End( vout_thread_t *p_vout )
+{
+    (void)p_vout;
+}
+
+/*****************************************************************************
  * Destroy: destroy video thread
  *****************************************************************************
  * Terminate an output method created by Create




More information about the vlc-devel mailing list