of the type 0xRRGBBAA parsed by av_parse_color(), using a simple int
was resulting in unexpected results as the most significant bit was
used for the sign.
Originally committed as revision 20778 to svn://svn.ffmpeg.org/ffmpeg/trunk
if (!strncmp(color_string, "0x", 2)) {
char *tail;
int len = strlen(color_string);
- int rgba = strtol(color_string, &tail, 16);
+ unsigned int rgba = strtoul(color_string, &tail, 16);
if (*tail || (len != 8 && len != 10)) {
av_log(log_ctx, AV_LOG_ERROR, "Invalid 0xRRGGBB[AA] color string: '%s'\n", color_string);
"Red",
"0x000000",
"0x0000000",
+ "0xff000000",
"0x3e34ff",
"0x3e34ffaa",
"0xffXXee",