[FFmpeg-devel] [PATCH] Make av_parse_color() support a "Random" color
Baptiste Coudurier
baptiste.coudurier
Sun May 10 20:32:24 CEST 2009
Hi,
Stefano Sabatini wrote:
> Hi,
> as recently suggested on ffmpeg-cvs.
>
> Regards.
>
>
> ------------------------------------------------------------------------
>
> Index: ffmpeg/libavfilter/parseutils.c
> ===================================================================
> --- ffmpeg.orig/libavfilter/parseutils.c 2009-05-10 11:18:12.000000000 +0200
> +++ ffmpeg/libavfilter/parseutils.c 2009-05-10 11:18:46.000000000 +0200
> @@ -217,7 +217,7 @@
>
> int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx)
> {
> - if (!strcmp(color_string, "bikeshed")) {
> + if (!strcmp(color_string, "Random") || !strcmp(color_string, "bikeshed")) {
> int rgba = ff_random_get_seed();
> rgba_color[0] = rgba >> 24;
> rgba_color[1] = rgba >> 16;
Why uppercase 'R' ?
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list