From 0345fb8aefc6f821df59396fac0de341529d7e31 Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Fri, 11 Nov 2016 10:51:49 -0800 Subject: [PATCH] mpegtsdemux: fix operator precedence in SAFE_FOURCC_ARGS Type cast has higher precedence than bitwise shift, so the third argument will truncate to 8 bits and then shift right by 8 bits resulting in constant zero. https://bugzilla.gnome.org/show_bug.cgi?id=774293 --- gst/mpegtsdemux/gstmpegdefs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/mpegtsdemux/gstmpegdefs.h b/gst/mpegtsdemux/gstmpegdefs.h index f0a225b0cc..5336286ef0 100644 --- a/gst/mpegtsdemux/gstmpegdefs.h +++ b/gst/mpegtsdemux/gstmpegdefs.h @@ -33,8 +33,8 @@ #define SAFE_FOURCC_ARGS(a) \ ((guint8) ((a)>>24)), \ ((guint8) ((a) >> 16 & 0xff)), \ - ((guint8) a >> 8 & 0xff), \ - ((guint8) a & 0xff), \ + ((guint8) ((a) >> 8 & 0xff)), \ + ((guint8) ((a) & 0xff)), \ SAFE_CHAR((a)>>24), \ SAFE_CHAR((a) >> 16 & 0xff), \ SAFE_CHAR((a) >> 8 & 0xff), \