[vlc-devel] commit: Ensure that meta-* are valid UTF8. (Laurent Aimar )
git version control
git at videolan.org
Sun Mar 22 16:34:04 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Mar 22 16:31:36 2009 +0100| [40b504b425a173d99d9b4785a574bc229c022f83] | committer: Laurent Aimar
Ensure that meta-* are valid UTF8.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40b504b425a173d99d9b4785a574bc229c022f83
---
src/input/input.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 94b1d76..f5b78a7 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2773,8 +2773,10 @@ static void InputMetaUser( input_thread_t *p_input, vlc_meta_t *p_meta )
/* Get meta information from user */
#define GET_META( field, s ) do { \
char *psz_string = var_GetNonEmptyString( p_input, (s) ); \
- if( psz_string ) \
+ if( psz_string ) {\
+ EnsureUTF8( psz_string ); \
vlc_meta_Set( p_meta, vlc_meta_ ## field, psz_string ); \
+ } \
free( psz_string ); } while(0)
GET_META( Title, "meta-title" );
More information about the vlc-devel
mailing list