Commit 1719b74a authored by stefano's avatar stefano

Make av_parse_color() return AVERROR(EINVAL) rather than -1.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23120 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7cf58e36
......@@ -231,7 +231,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx)
if (*tail || (len != 8 && len != 10)) {
av_log(log_ctx, AV_LOG_ERROR, "Invalid 0xRRGGBB[AA] color string: '%s'\n", color_string);
return -1;
return AVERROR(EINVAL);
}
if (len == 10) {
rgba_color[3] = rgba;
......@@ -248,7 +248,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx)
color_table_compare);
if (!entry) {
av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string);
return -1;
return AVERROR(EINVAL);
}
memcpy(rgba_color, entry->rgba_color, 4);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment