[libdvdcss-devel] dvdcss_open_stream: cast to off_t
[email protected] (Thomas Guillem) Wed, 28 Jan 2015 16:33:51 +0100 (CET)
| Newsgroups | gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvdcss | branch: master | Thomas Guillem <[email protected]> | Wed Jan 28 16:29:40 2015 +0100| [ec7c3a567dda8afd1516b49d33672557f981eb51] | committer: Jean-Baptiste Kempf dvdcss_open_stream: cast to off_t Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=ec7c3a567dda8afd1516b49d33672557f981eb51 --- src/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 0a19fe8..98ecbe3 100644 --- a/src/device.c +++ b/src/device.c @@ -546,7 +546,7 @@ static int libc_seek( dvdcss_t dvdcss, int i_blocks ) static int stream_seek( dvdcss_t dvdcss, int i_blocks ) { - off_t i_seek = i_blocks * DVDCSS_BLOCK_SIZE; + off_t i_seek = (off_t) i_blocks * (off_t) DVDCSS_BLOCK_SIZE; if( !dvdcss->p_stream_cb->pf_seek ) return -1; @@ -642,7 +642,7 @@ static int stream_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks ) { off_t i_size, i_ret, i_ret_blocks; - i_size = i_blocks * DVDCSS_BLOCK_SIZE; + i_size = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE; if( !dvdcss->p_stream_cb->pf_read ) return -1; _______________________________________________ libdvdcss-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvdcss-devel