[FFmpeg-devel] [PATCH 2/2] Extend color syntax, make it accept an alpha component specifier.
Stefano Sabatini
stefano.sabatini-lala
Sat Jun 12 00:46:47 CEST 2010
On date Thursday 2010-06-10 19:30:47 -0700, Baptiste Coudurier encoded:
> 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 ?
Fixed.
> IMHO rgba_color should be renamed to rgb_color, changed to 3 bytes,
I'll fix that in a separate patch.
> and rgba_color[3] set to 0x255.
Fixed, I'm attaching the patch to Ben's reply.
Regards.
--
FFmpeg = Foolish and Faithless Marvellous Patchable Elitist Gospel
More information about the ffmpeg-devel
mailing list