From fb56ad6bee2366813f6be4f697579c06774b062d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 31 Oct 2017 11:39:23 +0100 Subject: [PATCH] gstvalue: Cast GST_MAKE_FOURCC arguments To make it explicit that we are dealing with uint32 targets Avoids erroneous runtime error: left shift of negative value -1 https://bugzilla.gnome.org/show_bug.cgi?id=789700 --- gst/gstvalue.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/gstvalue.h b/gst/gstvalue.h index 1c8b460..6beee7a 100644 --- a/gst/gstvalue.h +++ b/gst/gstvalue.h @@ -42,7 +42,8 @@ G_BEGIN_DECLS * ]| * */ -#define GST_MAKE_FOURCC(a,b,c,d) ((guint32)((a)|(b)<<8|(c)<<16|(d)<<24)) +#define GST_MAKE_FOURCC(a,b,c,d) \ + ( (guint32)(a) | ((guint32) (b)) << 8 | ((guint32) (c)) << 16 | ((guint32) (d)) << 24 ) /** * GST_STR_FOURCC: -- 2.7.4