From c81e3e6fce84e72ed7cbba9d8f06daf27d295da7 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 4 Nov 2017 12:19:46 +0100 Subject: [PATCH] videotestsrc: Fix undefined left shift Cast value to target type --- gst/videotestsrc/videotestsrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/videotestsrc/videotestsrc.c b/gst/videotestsrc/videotestsrc.c index 5e841782d2..e4136a02b4 100644 --- a/gst/videotestsrc/videotestsrc.c +++ b/gst/videotestsrc/videotestsrc.c @@ -1206,9 +1206,9 @@ paint_tmpline_ARGB (paintinfo * p, int x, int w) #if G_BYTE_ORDER == G_LITTLE_ENDIAN value = (p->color->A << 0) | (p->color->R << 8) | - (p->color->G << 16) | (p->color->B << 24); + (p->color->G << 16) | ((guint32) p->color->B << 24); #else - value = (p->color->A << 24) | (p->color->R << 16) | + value = ((guint32) p->color->A << 24) | (p->color->R << 16) | (p->color->G << 8) | (p->color->B << 0); #endif