Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRupert Swarbrick <rupert.swarbrick@argondesign.com>2018-11-14 20:15:04 +0300
committerRupert Swarbrick <rupert.swarbrick@argondesign.com>2018-11-14 20:15:04 +0300
commitca33a9b78036e1b456fca111a70a635bea401c95 (patch)
treece3a7c5ab74502ee331c044e7138030a8bad1ee4
parenta79cebf2e69264adc07738df0052ccf9c6255492 (diff)
Fix operator order in obu.c
This code originally looked like "assert (init_bit_pos % 8 == 0)" and I changed it to use "& 7" to match the prevaling style. Unfortunately, "&" binds more weakly than "==". Oops!
-rw-r--r--src/obu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/obu.c b/src/obu.c
index f5a3608..dff0010 100644
--- a/src/obu.c
+++ b/src/obu.c
@@ -1070,7 +1070,7 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
// We must have read a whole number of bytes at this point (1 byte
// for the header and whole bytes at a time when reading the
// leb128 length field).
- assert(init_bit_pos & 7 == 0);
+ assert((init_bit_pos & 7) == 0);
// We also know that we haven't tried to read more than in->sz
// bytes yet (otherwise the error flag would have been set by the
@@ -1148,7 +1148,7 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
// just aligned it) and less than 8*pkt_bytelen because
// otherwise the overrun check would have fired.
const unsigned bit_pos = dav1d_get_bits_pos(&gb);
- assert(bit_pos & 7 == 0);
+ assert((bit_pos & 7) == 0);
assert(pkt_bytelen > (bit_pos >> 3));
dav1d_ref_inc(in->ref);
c->tile[c->n_tile_data].data.ref = in->ref;