[vlc-devel] commit: Moved snapshot_t structure to the only place where it is used. ( Laurent Aimar )

git version control git at videolan.org
Sun Mar 8 14:18:09 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Mar  8 14:10:23 2009 +0100| [a7139d450f322461b5c0df73149b7a34be493e4a] | committer: Laurent Aimar 

Moved snapshot_t structure to the only place where it is used.

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

 include/vlc_vout.h              |   11 -----------
 modules/video_output/snapshot.c |   12 +++++++++++-
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/include/vlc_vout.h b/include/vlc_vout.h
index 4636946..36b4b11 100644
--- a/include/vlc_vout.h
+++ b/include/vlc_vout.h
@@ -743,17 +743,6 @@ enum output_query_e
     VOUT_REDRAW_RECT,       /* arg1= area rect, res= */
 };
 
-typedef struct snapshot_t {
-  char *p_data;  /* Data area */
-
-  int i_width;       /* In pixels */
-  int i_height;      /* In pixels */
-  int i_datasize;    /* In bytes */
-  mtime_t date;      /* Presentation time */
-  vlc_cond_t p_condvar;
-  vlc_mutex_t p_mutex;
-} snapshot_t;
-
 /**@}*/
 
 #endif /* _VLC_VIDEO_H */
diff --git a/modules/video_output/snapshot.c b/modules/video_output/snapshot.c
index 701afc7..b5dce25 100644
--- a/modules/video_output/snapshot.c
+++ b/modules/video_output/snapshot.c
@@ -95,6 +95,16 @@ vlc_module_end ()
 /*****************************************************************************
  * vout_sys_t: video output descriptor
  *****************************************************************************/
+typedef struct snapshot_t
+{
+  uint8_t *p_data;   /* Data area */
+
+  int i_width;       /* In pixels */
+  int i_height;      /* In pixels */
+  int i_datasize;    /* In bytes */
+  mtime_t date;      /* Presentation time */
+} snapshot_t;
+
 struct vout_sys_t
 {
     snapshot_t **p_list;    /* List of available snapshots */
@@ -273,7 +283,7 @@ static int Init( vout_thread_t *p_vout )
         p_snapshot->i_height = i_height;
         p_snapshot->i_datasize = i_datasize;
         p_snapshot->date = 0;
-        p_snapshot->p_data = ( char* ) malloc( i_datasize );
+        p_snapshot->p_data = malloc( i_datasize );
         if( p_snapshot->p_data == NULL )
         {
             free( p_snapshot );




More information about the vlc-devel mailing list