vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Sun May 22 
20:52:03 2016 +0200| [00e70e92ba6704e53b0cc64c78cb9f593f2728b6] | committer: 
Jean-Baptiste Kempf

WMV strings are UTF-16 not latin1

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00e70e92ba6704e53b0cc64c78cb9f593f2728b6
---

 modules/demux/asf/libasf.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c
index 7cf75d8..c7b3213 100644
--- a/modules/demux/asf/libasf.c
+++ b/modules/demux/asf/libasf.c
@@ -92,13 +92,7 @@ static char *AsfObjectHelperReadString( const uint8_t 
*p_peek, int i_peek, uint8
     char *psz_string;
     if( ASF_HAVE(i_size) )
     {
-        psz_string = calloc( i_size/2 + 1, sizeof( char ) );
-        if( psz_string )
-        {
-            for( int i = 0; i < i_size/2; i++ )
-                psz_string[i] = GetWLE( &p_data[2*i] );
-            psz_string[i_size/2] = '\0';
-        }
+        psz_string = FromCharset( "UTF-16LE", p_data, i_size );
     }
     else
     {

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to