vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <[email protected]> | Fri Jun 21 18:34:11 2013 +0300| [0429744d138dac7914b9f46f224b52e0b6dcab75] | committer: Rémi Denis-Courmont
screen: fix mouse file location (fixes #8938) (cherry picked from commit e0e73f09a3467250e5028efd7c9bc6b0b1a69474 with modifications) > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=0429744d138dac7914b9f46f224b52e0b6dcab75 --- modules/access/screen/screen.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c index 73a279e..76f466c 100644 --- a/modules/access/screen/screen.c +++ b/modules/access/screen/screen.c @@ -33,6 +33,7 @@ #include <vlc_common.h> #include <vlc_plugin.h> #include <vlc_modules.h> /* module_need for "video blending" */ +#include <vlc_url.h> #include "screen.h" /***************************************************************************** @@ -190,13 +191,14 @@ static int Open( vlc_object_t *p_this ) #endif #ifdef SCREEN_MOUSE - char * psz_mouse = var_CreateGetNonEmptyString( p_demux, - "screen-mouse-image" ); - if( psz_mouse ) + char *mousefile = var_InheritString( p_demux, "screen-mouse-image" ); + char *mouseurl = mousefile ? make_URI( mousefile, NULL ) : NULL; + free( mousefile ); + if( mouseurl ) { image_handler_t *p_image; video_format_t fmt_in, fmt_out; - msg_Dbg( p_demux, "Using %s for the mouse pointer image", psz_mouse ); + msg_Dbg( p_demux, "Using %s for the mouse pointer image", mouseurl ); memset( &fmt_in, 0, sizeof( fmt_in ) ); memset( &fmt_out, 0, sizeof( fmt_out ) ); fmt_out.i_chroma = VLC_CODEC_RGBA; @@ -204,13 +206,13 @@ static int Open( vlc_object_t *p_this ) if( p_image ) { p_sys->p_mouse = - image_ReadUrl( p_image, psz_mouse, &fmt_in, &fmt_out ); + image_ReadUrl( p_image, mouseurl, &fmt_in, &fmt_out ); image_HandlerDelete( p_image ); } if( !p_sys->p_mouse ) msg_Err( p_demux, "Failed to open mouse pointer image (%s)", - psz_mouse ); - free( psz_mouse ); + mouseurl ); + free( mouseurl ); } #endif _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
