*/
video_frame_format_t format;
- void *p_data_orig; /**< pointer before memalign */
plane_t p[PICTURE_PLANE_MAX]; /**< description of the planes */
int i_planes; /**< number of allocated planes */
* This function will create a new picture.
* The picture created will implement a default release management compatible
* with picture_Hold and picture_Release. This default management will release
- * p_sys, p_q, p_data_orig fields if non NULL.
+ * p_sys, p_q, gc.p_sys fields if non NULL.
*/
VLC_API picture_t * picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) VLC_USED;
p_pic->i_planes = 0;
return VLC_EGENERIC;
}
- p_pic->p_data_orig = p_data; /* TODO: get rid of this */
+ p_pic->gc.p_sys = (void *)p_data;
/* Fill the p_pixels field for each plane */
p_pic->p[0].p_pixels = p_data;
static void PictureDestroy( picture_t *p_picture )
{
assert( p_picture &&
- vlc_atomic_get( &p_picture->gc.refcount ) == 0 &&
- p_picture->gc.p_sys == NULL );
+ vlc_atomic_get( &p_picture->gc.refcount ) == 0 );
free( p_picture->p_q );
- vlc_free( p_picture->p_data_orig );
+ vlc_free( p_picture->gc.p_sys );
free( p_picture->p_sys );
free( p_picture );
}
return NULL;
}
p_picture->p_sys = p_resource->p_sys;
+ assert( p_picture->gc.p_sys == NULL );
for( int i = 0; i < p_picture->i_planes; i++ )
{
free( p_picture );
return NULL;
}
+ assert( p_picture->gc.p_sys != NULL );
}
/* */
p_picture->format = fmt;
vlc_atomic_set( &p_picture->gc.refcount, 1 );
p_picture->gc.pf_destroy = PictureDestroy;
- p_picture->gc.p_sys = NULL;
return p_picture;
}