Commit 8a5c9258 authored by Laurent Aimar's avatar Laurent Aimar
Browse files

Added es_format_InitFromVideo helper.

parent 967845de
......@@ -287,6 +287,11 @@ VLC_EXPORT( void, video_format_FixRgb, ( video_format_t * ) );
*/
VLC_EXPORT( void, es_format_Init, ( es_format_t *, int i_cat, vlc_fourcc_t i_codec ) );
/**
* This function will initialize a es_format_t structure from a video_format_t.
*/
VLC_EXPORT( void, es_format_InitFromVideo, ( es_format_t *, const video_format_t * ) );
/**
* This functions will copy a es_format_t.
*/
......
......@@ -122,6 +122,7 @@ EnsureUTF8
es_format_Clean
es_format_Copy
es_format_Init
es_format_InitFromVideo
es_format_IsSimilar
filename_sanitize
filter_Blend
......
......@@ -258,6 +258,12 @@ void es_format_Init( es_format_t *fmt,
fmt->p_extra = NULL;
}
void es_format_InitFromVideo( es_format_t *p_es, const video_format_t *p_fmt )
{
es_format_Init( p_es, VIDEO_ES, p_fmt->i_chroma );
video_format_Copy( &p_es->video, p_fmt );
}
int es_format_Copy( es_format_t *dst, const es_format_t *src )
{
int i;
......
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