[FFmpeg-cvslog] r15056 - trunk/libavformat/mxfenc.c

Baptiste Coudurier baptiste.coudurier
Sun Aug 31 02:20:55 CEST 2008


Reimar D?ffinger wrote:
> Hello,
> On Sun, Aug 31, 2008 at 12:23:11AM +0200, bcoudurier wrote:
>> +/*
>> + * Write an ascii string as utf-16
>> + */
>> +static void mxf_write_utf16(ByteIOContext *pb, const char *value)
>> +{
>> +    int i, size = strlen(value)+1;
>> +    for (i = 0; i < size; i++)
>> +        put_be16(pb, value[i]);
> 
> I think it would be more reliable to cast to uint8_t because then
> no sign expansion happens and characters outside the 0 - 127 (ASCII)
> range will result only in one corrupted UTF-16 character instead
> of messing up the encoding completely (speaking out of my memory of
> UTF-16).
> 

Humm, I see, is this relevant with current code atm ? In the future, we
might implement a full utf-16 compliant function I think.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA




More information about the ffmpeg-cvslog mailing list