[vlc-devel] [vlc-commits] Win32: fix eject behaviour with UNICODE

Rémi Denis-Courmont remi at remlab.net
Tue Jan 15 08:56:34 CET 2013


On Tue, 15 Jan 2013 00:34:42 +0100 (CET), git at videolan.org (Jean-Baptiste
Kempf) wrote:
> vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan
15
> 00:07:22 2013 +0100| [d56c90bb1ffd0da1b413d1867afa330b76ae14fb] |
> committer: Jean-Baptiste Kempf
> 
> Win32: fix eject behaviour with UNICODE
> 
>>
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d56c90bb1ffd0da1b413d1867afa330b76ae14fb
> ---
> 
>  modules/gui/eject.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/modules/gui/eject.c b/modules/gui/eject.c
> index f188d93..03277e3 100644
> --- a/modules/gui/eject.c
> +++ b/modules/gui/eject.c
> @@ -34,6 +34,7 @@
>  
>  #include <vlc_common.h>
>  #include <vlc_fs.h>
> +#include <vlc_charset.h>
>  
>  #if defined( WIN32 )
>  #   include <mmsystem.h>
> @@ -132,7 +133,7 @@ static int intf_Eject( vlc_object_t *p_this, const
> char *psz_device )
>  
>      strcpy( psz_drive, "X:" );
>      psz_drive[0] = psz_device[0];
> -    op.lpstrElementName = psz_drive;
> +    op.lpstrElementName = ToT(psz_drive);

Memory leak.

>  
>      /* Set the flags for the device type */
>      i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID |
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> http://mailman.videolan.org/listinfo/vlc-commits

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list