From: "Ronald S. Bultje" <[email protected]>

---
 libavcodec/get_bits.h |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 7980284..4057cd2 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -55,7 +55,7 @@ typedef struct GetBitContext {
 #ifdef ALT_BITSTREAM_READER
     int index;
 #elif defined A32_BITSTREAM_READER
-    uint32_t *buffer_ptr;
+    const uint32_t *buffer_ptr;
     uint32_t cache0;
     uint32_t cache1;
     int bit_count;
@@ -178,11 +178,11 @@ static inline void skip_bits_long(GetBitContext *s, int 
n){
 
 #   define MIN_CACHE_BITS 32
 
-#   define OPEN_READER(name, gb)                        \
-    int name##_bit_count        = (gb)->bit_count;      \
-    uint32_t name##_cache0      = (gb)->cache0;         \
-    uint32_t name##_cache1      = (gb)->cache1;         \
-    uint32_t *name##_buffer_ptr = (gb)->buffer_ptr
+#   define OPEN_READER(name, gb)                              \
+    int name##_bit_count              = (gb)->bit_count;      \
+    uint32_t name##_cache0            = (gb)->cache0;         \
+    uint32_t name##_cache1            = (gb)->cache1;         \
+    const uint32_t *name##_buffer_ptr = (gb)->buffer_ptr
 
 #   define CLOSE_READER(name, gb) do {          \
         (gb)->bit_count  = name##_bit_count;    \
@@ -224,7 +224,7 @@ static inline void skip_bits_long(GetBitContext *s, int n){
 #   define GET_CACHE(name, gb) name##_cache0
 
 static inline int get_bits_count(const GetBitContext *s) {
-    return ((uint8_t*)s->buffer_ptr - s->buffer)*8 - 32 + s->bit_count;
+    return ((const uint8_t*)s->buffer_ptr - s->buffer)*8 - 32 + s->bit_count;
 }
 
 static inline void skip_bits_long(GetBitContext *s, int n){
-- 
1.7.6

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to