From 6249f42136e40e7dbb4fd2eb03cefe98b0f2f8b0 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Mon, 14 Jun 2010 18:58:24 +0300 Subject: [PATCH] video_filters: use make_URI for filename This restores that you don't need to give full url for example logo-filename it to work --- modules/video_filter/alphamask.c | 5 ++++- modules/video_filter/erase.c | 5 ++++- modules/video_filter/logo.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/video_filter/alphamask.c b/modules/video_filter/alphamask.c index eb8acf76d8..a8e927342b 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." ) @@ -181,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 ); 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 ); } diff --git a/modules/video_filter/erase.c b/modules/video_filter/erase.c index d69d92cf47..874dab92a0 100644 --- a/modules/video_filter/erase.c +++ b/modules/video_filter/erase.c @@ -35,6 +35,7 @@ #include #include +#include #include "filter_picture.h" /***************************************************************************** @@ -104,8 +105,10 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename ) memset( &fmt_out, 0, sizeof( video_format_t ) ); fmt_out.i_chroma = VLC_CODEC_YUVA; p_image = image_HandlerCreate( p_filter ); + char *psz_url = make_URI( psz_filename ); 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 ); if( p_filter->p_sys->p_mask ) { if( p_old_mask ) diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c index c15f1e3648..20a3c36e52 100644 --- a/modules/video_filter/logo.c +++ b/modules/video_filter/logo.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -614,7 +615,9 @@ static picture_t *LoadImage( vlc_object_t *p_this, const char *psz_filename ) if( !p_image ) return NULL; - picture_t *p_pic = image_ReadUrl( p_image, psz_filename, &fmt_in, &fmt_out ); + char *psz_url = make_URI( psz_filename ); + picture_t *p_pic = image_ReadUrl( p_image, psz_url, &fmt_in, &fmt_out ); + free( psz_url ); image_HandlerDelete( p_image ); return p_pic; -- 2.39.2