]> git.sesse.net Git - vlc/commitdiff
screen/mac: cosmetics
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 24 Feb 2013 22:15:07 +0000 (14:15 -0800)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 24 Feb 2013 22:15:07 +0000 (14:15 -0800)
modules/access/screen/mac.c

index 0ce6a5b5fbd673dbdc32ad1e3f16bf9e8dcc9d1e..09dd7b1e5e7c3364f5f133b4ecb9fad69075c1b8 100644 (file)
@@ -65,7 +65,7 @@ int screen_InitCapture(demux_t *p_demux)
     CGLError returnedError;
     int i_bits_per_pixel, i_chroma = 0;
 
-    p_sys->p_data = p_data = calloc(1, sizeof(screen_data_t ) );
+    p_sys->p_data = p_data = calloc(1, sizeof(screen_data_t));
     if (!p_data)
         return VLC_ENOMEM;
 
@@ -76,8 +76,8 @@ int screen_InitCapture(demux_t *p_demux)
     returnedError = CGGetOnlineDisplayList(0, NULL, &displayCount);
     if (!returnedError) {
         CGDirectDisplayID *ids;
-        ids = ( CGDirectDisplayID * )malloc( displayCount * sizeof( CGDirectDisplayID ) );
-        returnedError = CGGetOnlineDisplayList( displayCount, ids, &displayCount );
+        ids = (CGDirectDisplayID *)malloc(displayCount * sizeof(CGDirectDisplayID));
+        returnedError = CGGetOnlineDisplayList(displayCount, ids, &displayCount);
         if (!returnedError) {
             if (p_sys->i_display_id > 0) {
                 for (unsigned int i = 0; i < displayCount; i++) {
@@ -101,7 +101,7 @@ int screen_InitCapture(demux_t *p_demux)
 
     p_data->width = p_sys->i_width;
     p_data->height = p_sys->i_height;
-    if( p_data->width <= 0 || p_data->height <= 0 ) {
+    if (p_data->width <= 0 || p_data->height <= 0) {
         p_data->width = p_data->screen_width;
         p_data->height = p_data->screen_height;
     }
@@ -131,7 +131,7 @@ int screen_InitCapture(demux_t *p_demux)
     free(psz_name);
 
     /* setup format */
-    es_format_Init(&p_sys->fmt, VIDEO_ES, i_chroma );
+    es_format_Init(&p_sys->fmt, VIDEO_ES, i_chroma);
     p_sys->fmt.video.i_visible_width  =
     p_sys->fmt.video.i_width          = rect.size.width;
     p_sys->fmt.video.i_visible_height =
@@ -179,7 +179,7 @@ int screen_CloseCapture(demux_t *p_demux)
 block_t *screen_Capture(demux_t *p_demux)
 {
     demux_sys_t *p_sys = p_demux->p_sys;
-    screen_data_t *p_data = ( screen_data_t * )p_sys->p_data;
+    screen_data_t *p_data = (screen_data_t *)p_sys->p_data;
     block_t *p_block;
     CGRect capture_rect;
     CGImageRef image;
@@ -232,9 +232,6 @@ block_t *screen_Capture(demux_t *p_demux)
         CFRelease(dataProvider);
         CFRelease(image);
 
-
-        free(p_sys->p_mouse);
-
         return p_block;
     }