[vlc-commits] text_renderer: avoid 0xff << 24 with an int type
Felix Abecassis
git at videolan.org
Tue May 20 14:53:23 CEST 2014
vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Tue May 6 18:43:41 2014 +0200| [5cedfe6d1988246aeeb28b5c79351f7d36ef10d4] | committer: Felix Abecassis
text_renderer: avoid 0xff << 24 with an int type
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5cedfe6d1988246aeeb28b5c79351f7d36ef10d4
---
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 )
More information about the vlc-commits
mailing list