WMV strings are UTF-16 not latin1
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 22 May 2016 18:52:03 +0000 (20:52 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 22 May 2016 18:52:03 +0000 (20:52 +0200)
modules/demux/asf/libasf.c

index 7cf75d8..c7b3213 100644 (file)
@@ -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
     {