Commit a4d5ee49 authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Rafaël Carré

Don't call the legacy Freetype background renderer if the EIA-608 bg render feature is used.

If we're using the new background renderer which just renders the
background under the text (instead of the entire subpicture block),
then don't call the legacy render as well.  This prevents a alpha-
transparent box from being shown when rendering EIA-608 captions
if the user has the Freetype background opacity set to a nonzero
value.
Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent bd788b65
......@@ -1177,13 +1177,15 @@ static inline int RenderAXYZ( filter_t *p_filter,
/* Initialize the picture background */
uint8_t i_a = p_sys->i_background_opacity;
uint8_t i_x, i_y, i_z;
ExtractComponents( p_sys->i_background_color, &i_x, &i_y, &i_z );
FillPicture( p_picture, i_a, i_x, i_y, i_z );
if (p_region->b_renderbg) {
/* Render the background just under the text */
RenderBackground(p_region, p_line_head, p_bbox, i_margin, p_picture, i_text_width,
ExtractComponents, BlendPixel);
} else {
/* Render background under entire subpicture block */
ExtractComponents( p_sys->i_background_color, &i_x, &i_y, &i_z );
FillPicture( p_picture, i_a, i_x, i_y, i_z );
}
/* Render shadow then outline and then normal glyphs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment