Commit 6338806f authored by François Cartegnie's avatar François Cartegnie 🤞

vfilter: erase: use video_format_Init/Clean

parent 789e8aea
......@@ -101,14 +101,15 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
image_handler_t *p_image;
video_format_t fmt_in, fmt_out;
picture_t *p_old_mask = p_filter->p_sys->p_mask;
memset( &fmt_in, 0, sizeof( video_format_t ) );
memset( &fmt_out, 0, sizeof( video_format_t ) );
fmt_out.i_chroma = VLC_CODEC_YUVA;
video_format_Init( &fmt_in, 0 );
video_format_Init( &fmt_out, VLC_CODEC_YUVA );
p_image = image_HandlerCreate( p_filter );
char *psz_url = vlc_path2uri( psz_filename, NULL );
p_filter->p_sys->p_mask =
image_ReadUrl( p_image, psz_url, &fmt_in, &fmt_out );
free( psz_url );
video_format_Clean( &fmt_in );
video_format_Clean( &fmt_out );
if( p_filter->p_sys->p_mask )
{
if( p_old_mask )
......
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