From 12f24874aa0a96f570b02a4ba464c3d44ad579da Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 25 May 2012 14:15:44 +0200 Subject: [PATCH] mpegtsbase: Fix bit operation "a % 8" corresponds to "a & 0x7" (and not 0xf). spotted by Julian Scheel --- gst/mpegtsdemux/mpegtsbase.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/mpegtsdemux/mpegtsbase.h b/gst/mpegtsdemux/mpegtsbase.h index e12f591987..98de1d9516 100644 --- a/gst/mpegtsdemux/mpegtsbase.h +++ b/gst/mpegtsdemux/mpegtsbase.h @@ -176,9 +176,9 @@ struct _MpegTSBaseClass { void (*eit_info) (GstStructure *eit); }; -#define MPEGTS_BIT_SET(field, offs) ((field)[(offs) >> 3] |= (1 << ((offs) & 0xf))) -#define MPEGTS_BIT_UNSET(field, offs) ((field)[(offs) >> 3] &= ~(1 << ((offs) & 0xf))) -#define MPEGTS_BIT_IS_SET(field, offs) ((field)[(offs) >> 3] & (1 << ((offs) & 0xf))) +#define MPEGTS_BIT_SET(field, offs) ((field)[(offs) >> 3] |= (1 << ((offs) & 0x7))) +#define MPEGTS_BIT_UNSET(field, offs) ((field)[(offs) >> 3] &= ~(1 << ((offs) & 0x7))) +#define MPEGTS_BIT_IS_SET(field, offs) ((field)[(offs) >> 3] & (1 << ((offs) & 0x7))) GType mpegts_base_get_type(void);