[Ffmpeg-devel] GET/PUT_UTF8 misleading/wrong comment

Reimar Döffinger Reimar.Doeffinger
Sat Nov 18 12:13:30 CET 2006


Hello,
The comments say about the GET_BYTE/PUT_BYTE parameters:
"It will be execuded up to 4 times."
or
"PUT_BYTE will be executed up to 4 times".
While this may be right with valid UTF8, there is nothing at all in the
code to ensure this.
How should this be fixed?
Either replace 4 by 7, and maybe add that for valid UTF8 it will be 4 at
max, or replace
"if(ones==1)" by "if(ones==1 || ones > 4)" in GET_UTF8 and add
"val &= 0x1fffff" to PUT_UTF8 or...?

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list