Commit 6249f421 authored by Ilkka Ollakka's avatar 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
parent 14059010
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <vlc_image.h> #include <vlc_image.h>
#include <vlc_filter.h> #include <vlc_filter.h>
#include <vlc_url.h>
#define ALPHAMASK_HELP N_( \ #define ALPHAMASK_HELP N_( \
"Use an image's alpha channel as a transparency mask." ) "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 ) ...@@ -181,8 +182,10 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
if( p_filter->p_sys->p_mask ) if( p_filter->p_sys->p_mask )
picture_Release( p_filter->p_sys->p_mask ); picture_Release( p_filter->p_sys->p_mask );
p_image = image_HandlerCreate( p_filter ); p_image = image_HandlerCreate( p_filter );
char *psz_url = make_URI( psz_filename );
p_filter->p_sys->p_mask = 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 ); image_HandlerDelete( p_image );
} }
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <vlc_image.h> #include <vlc_image.h>
#include <vlc_filter.h> #include <vlc_filter.h>
#include <vlc_url.h>
#include "filter_picture.h" #include "filter_picture.h"
/***************************************************************************** /*****************************************************************************
...@@ -104,8 +105,10 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename ) ...@@ -104,8 +105,10 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
memset( &fmt_out, 0, sizeof( video_format_t ) ); memset( &fmt_out, 0, sizeof( video_format_t ) );
fmt_out.i_chroma = VLC_CODEC_YUVA; fmt_out.i_chroma = VLC_CODEC_YUVA;
p_image = image_HandlerCreate( p_filter ); p_image = image_HandlerCreate( p_filter );
char *psz_url = make_URI( psz_filename );
p_filter->p_sys->p_mask = 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_filter->p_sys->p_mask )
{ {
if( p_old_mask ) if( p_old_mask )
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
#include <vlc_filter.h> #include <vlc_filter.h>
#include <vlc_url.h>
#include <vlc_image.h> #include <vlc_image.h>
...@@ -614,7 +615,9 @@ static picture_t *LoadImage( vlc_object_t *p_this, const char *psz_filename ) ...@@ -614,7 +615,9 @@ static picture_t *LoadImage( vlc_object_t *p_this, const char *psz_filename )
if( !p_image ) if( !p_image )
return NULL; 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 ); image_HandlerDelete( p_image );
return p_pic; return p_pic;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment