[Ffmpeg-devel] retrieving asf textual info in other languages

Måns Rullgård mru
Tue May 17 10:12:26 CEST 2005


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
>> Hi guys:
>>
>>
>> What am I trying to do is to extract textual information from asf type
>> containers, namely the fields: title, author, copyright and comments. I'm
>> using libavformat to accomplish this. The problem I encountered is that the
>> extracted asf information within the AVFormatContext is corrupted. As I
>> know the textual information stored within asf containers should be in
>> unicode (UCS2), so I compiled a debug version of the libavformat and dug
>> deeper, this is what I found:

[...]

>> what I can see here is copying a 16 bit int (c) to a 8 bit char (*q), if
>> I'm not mistaken this would cut the higher 8 bit, this is fine for ascii
>> character which will just leave a lower ascii byte but will corrupt any
>> other language that also uses the higher byte. To confirm this I've also
>> tried some ffmpeg based player such as videoLan, and the result is the
>> same, no encoding other than ascii is shown in text fields. So this problem
>> definitly affects all asian languages.
>>
>> So here are my questions: is this cutting of higher byte a deliberate act
>> to avoid EOS '\0' character ? or is this a bug ? and will you guys consider
>> a patch or fix soon for this ?
>
> send a patch, if its clean and working it will be considered
> note, the thing must be converted to utf8

Is it acceptable to use iconv() for the conversion?

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list