Originally committed as revision 23120 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/parseutils.c (1 of 1 file). Show all
Unified · Split
| @@ -231,7 +231,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) · 230 unmodified lines | |||
| 231 | 231 | ||
| 232 | if (*tail || (len != 8 && len != 10)) { | 232 | if (*tail || (len != 8 && len != 10)) { |
| 233 | av_log(log_ctx, AV_LOG_ERROR, "Invalid 0xRRGGBB[AA] color string: '%s'\n", color_string); | 233 | av_log(log_ctx, AV_LOG_ERROR, "Invalid 0xRRGGBB[AA] color string: '%s'\n", color_string); |
| 234 | return -1; | 234 | return AVERROR(EINVAL); |
| 235 | } | 235 | } |
| 236 | if (len == 10) { | 236 | if (len == 10) { |
| 237 | rgba_color[3] = rgba; | 237 | rgba_color[3] = rgba; |
| @@ -248,7 +248,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) · 10 unmodified lines | |||
| 248 | color_table_compare); | 248 | color_table_compare); |
| 249 | if (!entry) { | 249 | if (!entry) { |
| 250 | av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string); | 250 | av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string); |
| 251 | return -1; | 251 | return AVERROR(EINVAL); |
| 252 | } | 252 | } |
| 253 | memcpy(rgba_color, entry->rgba_color, 4); | 253 | memcpy(rgba_color, entry->rgba_color, 4); |
| 254 | } | 254 | } |