From: Reynaldo H. Verdejo Pinochet Date: Thu, 31 Dec 2015 22:12:36 +0000 (-0800) Subject: flacparse: use shift instead of mask & comp X-Git-Tag: 1.10.4~661 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c43f84abf3c270ba0d787ff9402ca620f6738de0;p=platform%2Fupstream%2Fgst-plugins-good.git flacparse: use shift instead of mask & comp We are only interested on the first bit of the first byte of the metadata block header to figure out whether is marked as the last one. The shift makes it quite clearer. --- diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index 86e84ea95..98593b8b0 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -1558,7 +1558,7 @@ gst_flac_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame, res = GST_BASE_PARSE_FLOW_DROPPED; } else if (flacparse->state == GST_FLAC_PARSE_STATE_HEADERS) { - gboolean is_last = ((map.data[0] & 0x80) == 0x80); + gboolean is_last = map.data[0] >> 7; guint type = (map.data[0] & 0x7F); if (type == 127) {