[FFmpeg-devel] [PATCH 2/2] Extend color syntax, make it accept an alpha component specifier.

Baptiste Coudurier baptiste.coudurier
Fri Jun 11 04:30:47 CEST 2010


On 06/10/2010 03:58 PM, Stefano Sabatini wrote:
> On date Friday 2010-06-11 00:38:17 +0200, Stefano Sabatini encoded:
> [...]
>
> New, somehow more general variant:
>
> [..]
>
> +        entry = bsearch(color_string2,
>                                             color_table,
>                                             FF_ARRAY_ELEMS(color_table),
>                                             sizeof(ColorEntry),
>                                             color_table_compare);
>           if (!entry) {
> -            av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string);
> +            av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string2);
>               return AVERROR(EINVAL);
>           }
>           memcpy(rgba_color, entry->rgba_color, 4);

Doesn't this set A to 0 ?
IMHO rgba_color should be renamed to rgb_color, changed to 3 bytes, and 
rgba_color[3] set to 0x255.

[...]

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list