[libbluray-devel] fix bs_skip() at buffer boundary

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


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr  2 11:29:49 2015 +0300| [e13cda8b759b8033e43826fe7c3cc6bcefbcab23] | committer: hpi1

fix bs_skip() at buffer boundary

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

 src/util/bits.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/bits.c b/src/util/bits.c
index 17dce21..53eb25a 100644
--- a/src/util/bits.c
+++ b/src/util/bits.c
@@ -207,7 +207,7 @@ void bb_skip( BITBUFFER *bb, size_t i_count )
 void bs_skip( BITSTREAM *bs, size_t i_count )
 {
     int left;
-    size_t bytes = i_count >> 3;
+    size_t bytes = (i_count + 7) >> 3;
 
     if (bs->bb.p + bytes >= bs->bb.p_end) {
         bs->pos = bs->pos + (bs->bb.p - bs->bb.p_start);



More information about the libbluray-devel mailing list