[FFmpeg-cvslog] r15056 - trunk/libavformat/mxfenc.c
Reimar Döffinger
Reimar.Doeffinger
Sun Aug 31 02:00:38 CEST 2008
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).
Greetings,
Reimar D?ffinger
More information about the ffmpeg-cvslog
mailing list