[vlc-commits] commit: video_filters: use make_URI for filename (Ilkka Ollakka )

git at videolan.org git at videolan.org
Mon Jun 14 18:06:21 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Jun 14 18:58:24 2010 +0300| [6249f42136e40e7dbb4fd2eb03cefe98b0f2f8b0] | committer: Ilkka Ollakka 

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6249f42136e40e7dbb4fd2eb03cefe98b0f2f8b0
---

 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 eb8acf7..a8e9273 100644
--- a/modules/video_filter/alphamask.c
+++ b/modules/video_filter/alphamask.c
@@ -34,6 +34,7 @@
 
 #include <vlc_image.h>
 #include <vlc_filter.h>
+#include <vlc_url.h>
 
 #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 d69d92c..874dab9 100644
--- a/modules/video_filter/erase.c
+++ b/modules/video_filter/erase.c
@@ -35,6 +35,7 @@
 #include <vlc_image.h>
 
 #include <vlc_filter.h>
+#include <vlc_url.h>
 #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 c15f1e3..20a3c36 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -34,6 +34,7 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_filter.h>
+#include <vlc_url.h>
 
 #include <vlc_image.h>
 
@@ -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;



More information about the vlc-commits mailing list