[FFmpeg-devel] [PATCH] support for UTF-16 encoding in id3v2 tags
Reimar Döffinger
Reimar.Doeffinger
Thu Sep 10 13:58:57 CEST 2009
On Thu, Sep 10, 2009 at 01:07:17PM +0200, Michael Niedermayer wrote:
> On Sun, Sep 06, 2009 at 02:00:32PM +0200, Anton Khirnov wrote:
> > + * \def GET_UTF16(val, GET_BYTE, ERROR)
>
> > + * \param read should be an int and is set to the number of bytes read (2 or 4).
> > + */
> > +#define GET_UTF16(val, GET_BYTE, ERROR, read)\
These do not match together. Anyway, the "read" parameter is useless and
in addition inconsistent with GET_UTF8
> unsigned int hi= val - 0xD800;
> if(hi < 0x800) {
> val= get(s->pb) - 0xDC00;
> if(val > 0x3FFU || hi > 0x3FFU){
> ERROR
> }
> val+= (hi<<10) + 0x1000;
> }
Of course it should be
GET_16BIT, not get(s->pb).
More information about the ffmpeg-devel
mailing list