[vlc-commits] screen: fix mouse file location
Rémi Denis-Courmont
git at videolan.org
Fri Jun 21 17:37:34 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun 21 18:34:11 2013 +0300| [f5216b15484f207acc674daec463bd81c81bf11c] | committer: Rémi Denis-Courmont
screen: fix mouse file location
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5216b15484f207acc674daec463bd81c81bf11c
---
modules/access/screen/screen.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c
index 12fb132..63f8f46 100644
--- a/modules/access/screen/screen.c
+++ b/modules/access/screen/screen.c
@@ -209,13 +209,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 ? vlc_path2uri( 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;
@@ -223,13 +224,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
More information about the vlc-commits
mailing list