X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fblendbench.c;h=40b935a7e6379959ec125ee37f8d004e91c24b41;hb=20751c54ed83b50894ab3c66d6499ee6920c92f2;hp=9edb24248dc34a213e405d3139bfffd755922a70;hpb=f98a66cea0e6279975e5f5a6116bf3e9389ec5da;p=vlc diff --git a/modules/video_filter/blendbench.c b/modules/video_filter/blendbench.c index 9edb24248d..40b935a7e6 100644 --- a/modules/video_filter/blendbench.c +++ b/modules/video_filter/blendbench.c @@ -66,7 +66,7 @@ static picture_t *Filter( filter_t *, picture_t * ); #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-" @@ -80,7 +80,7 @@ vlc_module_begin () 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 ) @@ -153,6 +153,7 @@ static int Create( vlc_object_t *p_this ) 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 ) ); @@ -178,10 +179,15 @@ static int Create( vlc_object_t *p_this ) 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" ); @@ -225,7 +231,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) 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 );