X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=bitstream.h;h=a6349861a55092fcdc1f957d7570621fd51e6834;hp=5875b0d090e6e8007d34766ee090950c819188dd;hb=a85b3b947174c64ce06b4d6e438677055bf3f1ae;hpb=3857c8845280532a4c724f8215ef390b3a352567 diff --git a/bitstream.h b/bitstream.h index 5875b0d0..a6349861 100644 --- a/bitstream.h +++ b/bitstream.h @@ -36,8 +36,8 @@ struct vlc { static inline uint32_t show_bits(struct getbit_context *gbc, int num) { int idx = gbc->index; - const uint8_t *p = gbc->buffer + (idx >> 3); - uint32_t x = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; + const char *p = (const char *)gbc->buffer + (idx >> 3); + uint32_t x = read_u32_be(p); return (x << (idx & 7)) >> (32 - num); }