* parsing utils
*/
-#include <string.h>
+#include <strings.h>
#include "libavutil/avutil.h"
#include "libavutil/random_seed.h"
#include "parseutils.h"
static int color_table_compare(const void *lhs, const void *rhs)
{
- return strcmp(lhs, ((const ColorEntry *)rhs)->name);
+ return strcasecmp(lhs, ((const ColorEntry *)rhs)->name);
}
int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx)
{
- if (!strcmp(color_string, "bikeshed")) {
+ if (!strcasecmp(color_string, "bikeshed")) {
int rgba = ff_random_get_seed();
rgba_color[0] = rgba >> 24;
rgba_color[1] = rgba >> 16;
* Puts the RGBA values that correspond to color_string in rgba_color.
*
* @param color_string a string specifying a color. It can be the name of
- * a color or a 0xRRGGBB[AA] sequence.
+ * a color (case insensitive match) or a 0xRRGGBB[AA] sequence.
* @return >= 0 in case of success, a negative value in case of
* failure (for example if color_string cannot be parsed).
*/