mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
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.
This commit is contained in:
parent
8a745837aa
commit
c43f84abf3
1 changed files with 1 additions and 1 deletions
|
@ -1558,7 +1558,7 @@ gst_flac_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
|
||||||
|
|
||||||
res = GST_BASE_PARSE_FLOW_DROPPED;
|
res = GST_BASE_PARSE_FLOW_DROPPED;
|
||||||
} else if (flacparse->state == GST_FLAC_PARSE_STATE_HEADERS) {
|
} 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);
|
guint type = (map.data[0] & 0x7F);
|
||||||
|
|
||||||
if (type == 127) {
|
if (type == 127) {
|
||||||
|
|
Loading…
Reference in a new issue