[libbluray-devel] Hide warning "conversion from 'int64_t' to 'int', possible loss of data"

hpi1 git at videolan.org
Wed Feb 18 18:20:44 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Feb 18 19:16:50 2015 +0200| [58a94a8e4e3b06f329e5b63b7dd49cb6c30abaa2] | committer: hpi1

Hide warning "conversion from 'int64_t' to 'int', possible loss of data"

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

 src/libbluray/bluray.c   |    5 ++---
 src/libbluray/disc/dec.c |    4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index d96704b..e6c7a47 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1721,9 +1721,8 @@ static int _bd_read(BLURAY *bd, unsigned char *buf, int len)
                     uint64_t angle_pos;
 
                     angle_pos = (uint64_t)bd->angle_change_pkt * 192L;
-                    if (angle_pos - st->clip_pos < size)
-                    {
-                        size = angle_pos - st->clip_pos;
+                    if (angle_pos - st->clip_pos < size) {
+                        size = (unsigned int)(angle_pos - st->clip_pos);
                     }
                 }
             }
diff --git a/src/libbluray/disc/dec.c b/src/libbluray/disc/dec.c
index fa12ac2..694646e 100644
--- a/src/libbluray/disc/dec.c
+++ b/src/libbluray/disc/dec.c
@@ -72,9 +72,9 @@ static int64_t _stream_read(BD_FILE_H *fp, uint8_t *buf, int64_t size)
     }
 
     if (st->bdplus) {
-      if (libbdplus_fixup(st->bdplus, buf, size) < 0) {
+        if (libbdplus_fixup(st->bdplus, buf, (int)size) < 0) {
           /* there's no way to verify if the stream was decoded correctly */
-      }
+        }
     }
 
     return result;



More information about the libbluray-devel mailing list