[FFmpeg-devel] [PATCH] Make av_parse_color() support a "Random" color

Måns Rullgård mans
Tue May 12 01:13:15 CEST 2009


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> On date Monday 2009-05-11 23:08:22 +0100, M?ns Rullg?rd encoded:
>> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
>> 
>> > Also are you saying that there is no safe way to lowercase a string in
>> > C99?
>> 
>> Define lowercase.  As an example, in Turkish the lowercase version of
>> 'I' is not 'i'.
>
> Thanks, that means we should avoid functions fiddling with the
> locale. New attempt attached.
>
> Regards.
> -- 
> FFmpeg = Fiendish Freak Multipurpose Programmable Elastic God
>
> Index: ffmpeg/libavfilter/parseutils.c
> ===================================================================
> --- ffmpeg.orig/libavfilter/parseutils.c	2009-05-12 00:58:39.000000000 +0200
> +++ ffmpeg/libavfilter/parseutils.c	2009-05-12 00:58:59.000000000 +0200
> @@ -210,14 +210,33 @@
>      { "YellowGreen",          { 0x9A, 0xCD, 0x32 } },
>  };
>  
> +/**
> + * Compares two ASCII strings case-insensitively.
> + */
> +static int strcasecmp_ascii(const char *s1, const char *s2)

Oh, and names beginning with 'str' are reserved.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list