gst-plugins-base: videoscale: prevent implicit upgrade to integer type and sign extension

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Thu Jan 19 07:51:46 PST 2012


Module: gst-plugins-base
Branch: master
Commit: e82ff60a4cd8ca8ac0abcf09c4802ccb5fe61988
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=e82ff60a4cd8ca8ac0abcf09c4802ccb5fe61988

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Thu Jan 19 16:35:54 2012 +0100

videoscale: prevent implicit upgrade to integer type and sign extension

---

 gst/videoscale/vs_fill_borders.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gst/videoscale/vs_fill_borders.c b/gst/videoscale/vs_fill_borders.c
index 160e137..ca6cfd5 100644
--- a/gst/videoscale/vs_fill_borders.c
+++ b/gst/videoscale/vs_fill_borders.c
@@ -394,8 +394,8 @@ vs_fill_borders_AYUV64 (const VSImage * dest, const uint8_t * val)
   uint8_t *data;
   uint64_t v;
 
-  v = (val[0] << 8) | (val[1] << 24) | (((guint64) val[2]) << 40) | (((guint64)
-          val[3]) << 56);
+  v = (((guint32) val[0]) << 8) | (((guint32) val[1]) << 24) |
+      (((guint64) val[2]) << 40) | (((guint64) val[3]) << 56);
 
   data = dest->real_pixels;
   for (i = 0; i < top; i++) {



More information about the gstreamer-commits mailing list