bool b_progressive; /**< is it a progressive frame ? */
bool b_top_field_first; /**< which field is first */
unsigned int i_nb_fields; /**< # of displayed fields */
+ void * context; /**< video format-specific data pointer,
+ * must point to a (void (*)(void*)) pointer to free the context */
/**@}*/
/** Private data - the video output plugin might want to put stuff here to
/*****************************************************************************
*
*****************************************************************************/
+
+static void PictureDestroyContext( picture_t *p_picture )
+{
+ void (**context)( void * ) = p_picture->context;
+ if( context != NULL )
+ {
+ void (*context_destroy)( void * ) = *context;
+ context_destroy( context );
+ p_picture->context = NULL;
+ }
+}
+
static void PictureDestroy( picture_t *p_picture )
{
assert( p_picture &&
p_picture->b_progressive = false;
p_picture->i_nb_fields = 2;
p_picture->b_top_field_first = false;
+ PictureDestroyContext( p_picture );
}
/*****************************************************************************
if( refs > 0 )
return;
+ PictureDestroyContext( p_picture );
if( p_picture->gc.pf_destroy != NULL )
p_picture->gc.pf_destroy( p_picture );
}