[libbluray-devel] Use correct type

hpi1 git at videolan.org
Sun Sep 23 23:54:13 CEST 2012


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Sep 24 00:15:31 2012 +0300| [94b43984b764d52e8f3d207f3762b208167771c3] | committer: hpi1

Use correct type

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

 src/libbluray/bdnav/navigation.c |    4 ++--
 src/libbluray/hdmv/hdmv_vm.c     |    4 ++--
 src/util/bits.h                  |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index f6ca0d8..e7a28f1 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -339,8 +339,8 @@ _fill_mark(NAV_TITLE *title, NAV_MARK *mark, int entry)
 static void
 _extrapolate_title(NAV_TITLE *title)
 {
-    uint64_t duration = 0;
-    uint64_t pkt = 0;
+    uint32_t duration = 0;
+    uint32_t pkt = 0;
     unsigned ii, jj;
     MPLS_PL *pl = title->pl;
     MPLS_PI *pi;
diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index e0942bc..f7a6c14 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -869,14 +869,14 @@ static inline uint32_t ADD_u32(uint32_t a, uint32_t b)
 {
   /* overflow -> saturate */
   uint64_t result = (uint64_t)a + b;
-  return result < 0xffffffff ? result : 0xffffffff;
+  return result < 0xffffffff ? (uint32_t)result : 0xffffffff;
 }
 
 static inline uint32_t MUL_u32(uint32_t a, uint32_t b)
 {
   /* overflow -> saturate */
   uint64_t result = (uint64_t)a * b;
-  return result < 0xffffffff ? result : 0xffffffff;
+  return result < 0xffffffff ? (uint32_t)result : 0xffffffff;
 }
 
 /*
diff --git a/src/util/bits.h b/src/util/bits.h
index b9843fa..3943249 100644
--- a/src/util/bits.h
+++ b/src/util/bits.h
@@ -49,7 +49,7 @@ typedef struct {
     BITBUFFER  bb;
     off_t      pos;
     off_t      end;
-    int        size;
+    size_t     size;
 } BITSTREAM;
 
 static inline void bb_init( BITBUFFER *bb, uint8_t *p_data, size_t i_data )



More information about the libbluray-devel mailing list