Commit ef3cb264 authored by Laurent Aimar's avatar Laurent Aimar

Fixed #949 (UTF-8 url support)

parent 830641e4
......@@ -124,10 +124,27 @@ void var_buffer_addUTF16( var_buffer_t *p_buf, char *p_str )
}
else
{
for( i = 0; i < strlen( p_str ) + 1; i++ ) // and 0
vlc_iconv_t iconv_handle;
size_t i_in = strlen( p_str );
size_t i_out = i_in * 4;
char *psz_out, *psz_tmp;
uint16_t *pw;
psz_out = psz_tmp = malloc( i_out + 1 );
iconv_handle = vlc_iconv_open( "UTF-16LE", "UTF-8" );
vlc_iconv( iconv_handle, &p_str, &i_in, &psz_tmp, &i_out );
vlc_iconv_close( iconv_handle );
psz_tmp[0] = '\0';
psz_tmp[1] = '\0';
for( i = 0; ; i += 2 )
{
var_buffer_add16( p_buf, p_str[i] );
uint16_t v = GetWLE( &psz_out[i] );
var_buffer_add16( p_buf, v );
if( !v )
break;
}
free( psz_out );
}
}
......
......@@ -1218,14 +1218,15 @@ static int mms_ParsePacket( access_t *p_access,
if( i_packet_seq_num != p_sys->i_packet_seq_num )
{
#if 0
/* FIXME for udp could be just wrong order ? */
msg_Warn( p_access,
"detected packet lost (%d != %d)",
i_packet_seq_num,
p_sys->i_packet_seq_num );
p_sys->i_packet_seq_num = i_packet_seq_num;
#endif
}
p_sys->i_packet_seq_num++;
p_sys->i_packet_seq_num = i_packet_seq_num + 1;
if( i_packet_id == p_sys->i_header_packet_id_type )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment