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;
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++) {
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;
}
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 =
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;
CFRelease(dataProvider);
CFRelease(image);
-
- free(p_sys->p_mouse);
-
return p_block;
}