]> git.sesse.net Git - vlc/commitdiff
Fix corrupted rendering of EIA-608 captions
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Sun, 13 Jan 2013 21:53:05 +0000 (16:53 -0500)
committerRafaël Carré <funman@videolan.org>
Tue, 15 Jan 2013 16:23:01 +0000 (17:23 +0100)
When we moved the code to use the legacy method *or* the new method,
we lost the functionality that actually initialized the memory allocated
for the entire subpicture region (including the part where captions
weren't being rendered.

This was most obvious when regression testing on OSX, where it
resulted in old captions continuing to appear on screen even
after being cleared, or garbage in the render buffer.

Add a line that effectively zeros out the buffer prior to use.

Signed-off-by: Rafaël Carré <funman@videolan.org>
modules/text_renderer/freetype.c

index 63894359afc025adcdfbe3f8a68292f4fc52e0b8..4592c258c418bda9b1067e2ede227fbe43666c24 100644 (file)
@@ -1180,6 +1180,7 @@ static inline int RenderAXYZ( filter_t *p_filter,
 
     if (p_region->b_renderbg) {
         /* Render the background just under the text */
+        FillPicture( p_picture, 0x00, 0x00, 0x00, 0x00 );
         RenderBackground(p_region, p_line_head, p_bbox, i_margin, p_picture, i_text_width,
                          ExtractComponents, BlendPixel);
     } else {