Originally committed as revision 18828 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/parseutils.c (1 of 2 files). Show all
Unified · Split
| @@ -217,7 +217,7 @@ static int color_table_compare(const void *lhs, const void *rhs) · 216 unmodified lines | |||
| 217 | 217 | ||
| 218 | int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) | 218 | int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) |
| 219 | { | 219 | { |
| 220 | if (!strcasecmp(color_string, "bikeshed")) { | 220 | if (!strcasecmp(color_string, "random") || !strcasecmp(color_string, "bikeshed")) { |
| 221 | int rgba = ff_random_get_seed(); | 221 | int rgba = ff_random_get_seed(); |
| 222 | rgba_color[0] = rgba >> 24; | 222 | rgba_color[0] = rgba >> 24; |
| 223 | rgba_color[1] = rgba >> 16; | 223 | rgba_color[1] = rgba >> 16; |
| @@ -304,6 +304,7 @@ int main(void) · 80 unmodified lines | |||
| 304 | uint8_t rgba[4]; | 304 | uint8_t rgba[4]; |
| 305 | const char *color_names[] = { | 305 | const char *color_names[] = { |
| 306 | "bikeshed", | 306 | "bikeshed", |
| 307 | "RaNdOm", | ||
| 307 | "foo", | 308 | "foo", |
| 308 | "red", | 309 | "red", |
| 309 | "Red ", | 310 | "Red ", |