#define BLEND_CHROMA_TEXT N_("Chroma for the blend image")
#define BLEND_CHROMA_LONGTEXT N_("Chroma which the blend image will be loaded" \
- "in")
+ " in")
#define CFG_PREFIX "blendbench-"
set_section( N_("Benchmarking"), NULL )
add_integer( CFG_PREFIX "loops", 1000, LOOPS_TEXT,
LOOPS_LONGTEXT, false )
- add_integer_with_range( CFG_PREFIX "alpha", 128, 0, 255, NULL, ALPHA_TEXT,
+ add_integer_with_range( CFG_PREFIX "alpha", 128, 0, 255, ALPHA_TEXT,
ALPHA_LONGTEXT, false )
set_section( N_("Base image"), NULL )
filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys;
char *psz_temp, *psz_cmd;
+ int i_ret;
/* Allocate structure */
p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
p_sys->i_base_chroma = VLC_FOURCC( psz_temp[0], psz_temp[1],
psz_temp[2], psz_temp[3] );
psz_cmd = var_CreateGetStringCommand( p_filter, CFG_PREFIX "base-image" );
- blendbench_LoadImage( p_this, &p_sys->p_base_image, p_sys->i_base_chroma,
- psz_cmd, "Base" );
+ i_ret = blendbench_LoadImage( p_this, &p_sys->p_base_image,
+ p_sys->i_base_chroma, psz_cmd, "Base" );
free( psz_temp );
free( psz_cmd );
+ if( i_ret != VLC_SUCCESS )
+ {
+ free( p_sys );
+ return i_ret;
+ }
psz_temp = var_CreateGetStringCommand( p_filter,
CFG_PREFIX "blend-chroma" );
picture_Release( p_pic );
return NULL;
}
- vlc_object_attach( p_blend, p_filter );
p_blend->fmt_out.video = p_sys->p_base_image->format;
p_blend->fmt_in.video = p_sys->p_blend_image->format;
p_blend->p_module = module_need( p_blend, "video blending", NULL, false );