vlc | branch: master | Devin Heitmueller <[email protected]> | Fri 
Jan 11 14:28:04 2013 -0500| [a4d5ee4975c20f8517206c77d79dc4e184ec7eab] | 
committer: 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: Rafaël Carré <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4d5ee4975c20f8517206c77d79dc4e184ec7eab
---

 modules/text_renderer/freetype.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 5070462..99fa521 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -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 */

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to