- //msg_Dbg( p_filter, "Found %d face(s)\n", faces->total );
- if (NULL != p_filter->p_sys->event_info.p_region)
- {
- free(p_filter->p_sys->event_info.p_region);
- p_filter->p_sys->event_info.p_region = NULL;
- }
- if( NULL == ( p_filter->p_sys->event_info.p_region =
- (video_filter_region_info_t *)malloc(faces->total*sizeof(video_filter_region_info_t))))
- {
- msg_Err( p_filter, "out of memory" );
+ //msg_Dbg( p_filter, "Found %d face(s)", faces->total );
+ free( p_sys->event_info.p_region );
+ p_sys->event_info.p_region = (video_filter_region_info_t*)
+ calloc( faces->total, sizeof(video_filter_region_info_t));
+ if( !p_sys->event_info.p_region )