Commit a1cd0034 authored by Laurent Aimar's avatar Laurent Aimar

Added a picture_Reset helper.

parent c0e71612
......@@ -198,6 +198,12 @@ static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_
/* FIXME: copy ->p_q and ->p_qstride */
}
/**
* This function will reset a picture informations (properties and quantizers).
* It is sometimes usefull for reusing pictures (like from a pool).
*/
VLC_EXPORT( void, picture_Reset, ( picture_t * ) );
/**
* This function will copy the picture pixels.
* You can safely copy between pictures that do not have the same size,
......
......@@ -277,6 +277,7 @@ picture_CopyPixels
picture_Delete
picture_Export
picture_New
picture_Reset
picture_Setup
plane_CopyPixels
playlist_Add
......
......@@ -649,6 +649,20 @@ static void PictureReleaseCallback( picture_t *p_picture )
picture_Delete( p_picture );
}
/*****************************************************************************
*
*****************************************************************************/
void picture_Reset( picture_t *p_picture )
{
/* */
p_picture->date = VLC_TS_INVALID;
p_picture->b_force = false;
p_picture->b_progressive = false;
p_picture->i_nb_fields = 0;
p_picture->b_top_field_first = false;
picture_CleanupQuant( p_picture );
}
/*****************************************************************************
*
*****************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment