diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-10-02 13:43:42 +0300 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-10-04 14:09:08 +0300 |
commit | abe9adfb31566c415fd830a8d4977c79512d4385 (patch) | |
tree | 544d656e3bfdb07a2dac57f77842367e7927b84f /libavcodec | |
parent | b8b13acd70a1c1b6c044f967d78cb82f1a53887b (diff) |
rangecoder: Use AV_RB16 instead of bytestream_get_be16
Silence an incompatible-pointer-types-discards-qualifiers warning from clang.
rangecoder.c:58:34: warning: passing
'uint8_t **' (aka 'unsigned char **') to parameter of type
'const uint8_t **' (aka 'const unsigned char **') discards qualifiers in
nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/rangecoder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/rangecoder.c b/libavcodec/rangecoder.c index af0a8c009e..9897f586df 100644 --- a/libavcodec/rangecoder.c +++ b/libavcodec/rangecoder.c @@ -34,9 +34,10 @@ #include <string.h> #include "libavutil/attributes.h" +#include "libavutil/intreadwrite.h" + #include "avcodec.h" #include "rangecoder.h" -#include "bytestream.h" av_cold void ff_init_range_encoder(RangeCoder *c, uint8_t *buf, int buf_size) { @@ -55,7 +56,8 @@ av_cold void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, /* cast to avoid compiler warning */ ff_init_range_encoder(c, (uint8_t *)buf, buf_size); - c->low = bytestream_get_be16(&c->bytestream); + c->low = AV_RB16(c->bytestream); + c->bytestream += 2; } void ff_build_rac_states(RangeCoder *c, int factor, int max_p) |