[vlc-devel] [PATCH 4/7] text_renderer: avoid 0xff << 24 with an int type
Felix Abecassis
felix.abecassis at gmail.com
Tue May 6 19:08:28 CEST 2014
---
modules/text_renderer/text_renderer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/text_renderer/text_renderer.c b/modules/text_renderer/text_renderer.c
index 3648581..4119c34 100644
--- a/modules/text_renderer/text_renderer.c
+++ b/modules/text_renderer/text_renderer.c
@@ -398,7 +398,7 @@ int HandleFontAttributes( xml_reader_t *p_xml_reader,
rv = PushFont( p_fonts,
psz_fontname,
i_font_size,
- (i_font_color & 0xffffff) | ((i_font_alpha & 0xff) << 24),
+ (i_font_color & 0xffffff) | ((uint32_t)(i_font_alpha & 0xff) << 24),
i_karaoke_bg_color );
free( psz_fontname );
@@ -572,7 +572,7 @@ int ProcessNodes( filter_t *p_filter,
p_default_style->psz_fontname,
i_font_size,
(i_font_color & 0xffffff) |
- ((i_font_alpha & 0xff) << 24),
+ ((uint32_t)(i_font_alpha & 0xff) << 24),
0x00ffffff );
}
if( p_default_style->i_style_flags & STYLE_BOLD )
--
1.9.1
More information about the vlc-devel
mailing list