[vlc-devel] commit: sccaess_screen: little cleaning. ( Rémi Duraffort )

git version control git at videolan.org
Sun Mar 8 23:08:27 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Mar  8 21:55:38 2009 +0100| [6f24f332579b5d4a6b98d4124693d98227cfe576] | committer: Rémi Duraffort 

sccaess_screen: little cleaning.

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

 modules/access/screen/mac.c    |    2 +-
 modules/access/screen/screen.c |    7 ++-----
 modules/access/screen/x11.c    |    4 ++--
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/access/screen/mac.c b/modules/access/screen/mac.c
index c2aeb53..02ddb7f 100644
--- a/modules/access/screen/mac.c
+++ b/modules/access/screen/mac.c
@@ -186,7 +186,7 @@ block_t *screen_Capture( demux_t *p_demux )
     if( !( p_block = block_New( p_demux, i_size ) ) )
     {
         msg_Warn( p_demux, "cannot get block" );
-        return 0;
+        return NULL;
     }
     
     CGPoint cursor_pos;
diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c
index 2762602..e70b168 100644
--- a/modules/access/screen/screen.c
+++ b/modules/access/screen/screen.c
@@ -137,7 +137,6 @@ static int Open( vlc_object_t *p_this )
 {
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys;
-    vlc_value_t val;
 
     /* Fill p_demux field */
     p_demux->pf_demux = Demux;
@@ -149,10 +148,8 @@ static int Open( vlc_object_t *p_this )
     /* Update default_pts to a suitable value for screen access */
     var_Create( p_demux, "screen-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
 
-    var_Create( p_demux, "screen-fps", VLC_VAR_FLOAT|VLC_VAR_DOINHERIT );
-    var_Get( p_demux, "screen-fps", &val );
-    p_sys->f_fps = val.f_float;
-    p_sys->i_incr = 1000000 / val.f_float;
+    p_sys->f_fps = var_CreateGetFloat( p_demux, "screen-fps" );
+    p_sys->i_incr = 1000000 / p_sys->f_fps;;
     p_sys->i_next_date = 0;
 
 #ifdef SCREEN_SUBSCREEN
diff --git a/modules/access/screen/x11.c b/modules/access/screen/x11.c
index 177f382..8723f15 100644
--- a/modules/access/screen/x11.c
+++ b/modules/access/screen/x11.c
@@ -150,7 +150,7 @@ block_t *screen_Capture( demux_t *p_demux )
     if( !image )
     {
         msg_Warn( p_demux, "cannot get image" );
-        return 0;
+        return NULL;
     }
 
     i_size = image->bytes_per_line * image->height;
@@ -159,7 +159,7 @@ block_t *screen_Capture( demux_t *p_demux )
     {
         msg_Warn( p_demux, "cannot get block" );
         XDestroyImage( image );
-        return 0;
+        return NULL;
     }
 
     vlc_memcpy( p_block->p_buffer, image->data, i_size );




More information about the vlc-devel mailing list