[libbluray-devel] bits: mark buffer const

hpi1 git at videolan.org
Thu Apr 2 10:33:12 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr  2 10:20:25 2015 +0300| [9e8f0a2d194315bbc82f095e13c01663eb109cf6] | committer: hpi1

bits: mark buffer const

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=9e8f0a2d194315bbc82f095e13c01663eb109cf6
---

 src/util/bits.c |    2 +-
 src/util/bits.h |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/util/bits.c b/src/util/bits.c
index 9626bd4..1c989ea 100644
--- a/src/util/bits.c
+++ b/src/util/bits.c
@@ -32,7 +32,7 @@
  * This file defines functions, structures for handling streams of bits
  */
 
-void bb_init( BITBUFFER *bb, uint8_t *p_data, size_t i_data )
+void bb_init( BITBUFFER *bb, const uint8_t *p_data, size_t i_data )
 {
     bb->p_start = p_data;
     bb->p       = bb->p_start;
diff --git a/src/util/bits.h b/src/util/bits.h
index b120ffe..62ab496 100644
--- a/src/util/bits.h
+++ b/src/util/bits.h
@@ -39,9 +39,9 @@
 #define BF_BUF_SIZE   (1024*32)
 
 typedef struct {
-    uint8_t *p_start;
-    uint8_t *p;
-    uint8_t *p_end;
+    const uint8_t *p_start;
+    const uint8_t *p;
+    const uint8_t *p_end;
 
     ssize_t  i_left;    /* i_count number of available bits */
 } BITBUFFER;
@@ -55,7 +55,7 @@ typedef struct {
     size_t     size;
 } BITSTREAM;
 
-BD_PRIVATE void bb_init( BITBUFFER *bb, uint8_t *p_data, size_t i_data );
+BD_PRIVATE void bb_init( BITBUFFER *bb, const uint8_t *p_data, size_t i_data );
 BD_PRIVATE void bs_init( BITSTREAM *bs, BD_FILE_H *fp );
 BD_PRIVATE void bb_seek( BITBUFFER *bb, int64_t off, int whence);
 BD_PRIVATE void bs_seek( BITSTREAM *bs, int64_t off, int whence);



More information about the libbluray-devel mailing list