X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Falphamask.c;h=bda9fbe521a7facc853724e5127878fb2b02a053;hb=20751c54ed83b50894ab3c66d6499ee6920c92f2;hp=a280e14e7682cfd8b83a712e0e34f38cdad38807;hpb=14f37b2101842fa6e427f962f689db74eff6faba;p=vlc diff --git a/modules/video_filter/alphamask.c b/modules/video_filter/alphamask.c index a280e14e76..bda9fbe521 100644 --- a/modules/video_filter/alphamask.c +++ b/modules/video_filter/alphamask.c @@ -34,6 +34,7 @@ #include #include +#include #define ALPHAMASK_HELP N_( \ "Use an image's alpha channel as a transparency mask." ) @@ -65,11 +66,10 @@ vlc_module_begin () set_category( CAT_VIDEO ) set_subcategory( SUBCAT_VIDEO_VFILTER ) set_capability( "video filter2", 0 ) - add_shortcut( "alphamask" ) - add_shortcut( "mask" ) + add_shortcut( "alphamask", "mask" ) set_callbacks( Create, Destroy ) - add_string( CFG_PREFIX "mask", NULL, NULL, MASK_TEXT, + add_loadfile( CFG_PREFIX "mask", NULL, MASK_TEXT, MASK_LONGTEXT, false ) vlc_module_end () @@ -92,7 +92,7 @@ static int Create( vlc_object_t *p_this ) if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA ) { msg_Err( p_filter, - "Unsupported input chroma \"%4s\". " + "Unsupported input chroma \"%4.4s\". " "Alphamask can only use \"YUVA\".", (char*)&p_filter->fmt_in.video.i_chroma ); return VLC_EGENERIC; @@ -182,8 +182,10 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename ) if( p_filter->p_sys->p_mask ) picture_Release( p_filter->p_sys->p_mask ); p_image = image_HandlerCreate( p_filter ); + char *psz_url = make_URI( psz_filename, NULL ); p_filter->p_sys->p_mask = - image_ReadUrl( p_image, psz_filename, &fmt_in, &fmt_out ); + image_ReadUrl( p_image, psz_url, &fmt_in, &fmt_out ); + free( psz_url ); image_HandlerDelete( p_image ); }